Sha256: fe05f4e61f3ca3631f93219bb08f54e6d897f951a22ce797536fc2e560f8be72

Contents?: true

Size: 1.65 KB

Versions: 1

Compression:

Stored size: 1.65 KB

Contents

@import "settings.global";

@mixin tooltip {
  position: relative;
  overflow: visible;
  &:before,
  &:after {
    visibility: hidden;
    z-index: $z-over-page;
  }
  &:before {
    content: '';
    position: absolute;
    border: $tooltip-arrow-width solid transparent;
  }

  &:after {
    visibility: hidden;
    content: attr(aria-label);
    position: absolute;
    padding: 0.25em 0.5em;
    border: $tooltip-body-border-width $tooltip-body-border-style $tooltip-body-border-color;
    border-radius: $border-radius;
    background-color: $tooltip-body-background-color;
    color: $tooltip-body-color;
    white-space: nowrap;
  }

  &:hover:before,
  &:hover:after {
    visibility: visible;
  }
}

@mixin tooltip--top {
  &:before {
    border-top-color: $tooltip-body-border-color;
    top: 0%;
    left: 50%;
    transform: translate(-50%, -1em);
  }
  &:after {
    top: 0%;
    left: 50%;
    transform: translate(-50%, -3em);
  }
}

@mixin tooltip--right {
  &:before {
    border-right-color: $tooltip-body-border-color;
    top: 50%;
    left: 100%;
    transform: translate(0em, -50%);
  }
  &:after {
    top: 50%;
    left: 100%;
    transform: translate(1em, -50%);
  }
}

@mixin tooltip--bottom {
  &:before {
    border-bottom-color: $tooltip-body-border-color;
    bottom: 0%;
    left: 50%;
    transform: translate(-50%, 1em);
  }
  &:after {
    bottom: 0%;
    left: 50%;
    transform: translate(-50%, 3em);
  }
}

@mixin tooltip--left {
  &:before {
    border-left-color: $tooltip-body-border-color;
    top: 50%;
    right: 100%;
    transform: translate(0em, -50%);
  }
  &:after {
    top: 50%;
    right: 100%;
    transform: translate(-1em, -50%);
  }
}

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
blaze-css-rails-0.0.1 app/assets/stylesheets/mixins/_components.tooltips.scss