Sha256: e59c5e5c278fe63eeab107a1e8d208115674bd74e1905b29c2dcd8b8801092f8

Contents?: true

Size: 1.55 KB

Versions: 8

Compression:

Stored size: 1.55 KB

Contents

.tooltip-item {
  $tooltip-background: white;
  $tooltip-color: $base-font-color;
  $tooltip-width: 16em;
  $tooltip-arrow-width: 8px;
  $tooltip-shadow: 0 2px 2px silver;
  $tooltip-distance-from-item: 140%;
  $tooltip-arrow-distance-from-box: -$tooltip-arrow-width * 3.2;

  border: 1px solid $base-border-color;
  padding: .5em 1em;
  border-radius: $base-border-radius;
  position: relative;
  margin-bottom: $base-line-height;

  &:hover .tooltip {
    opacity: 1;
    visibility: visible;
  }

  .tooltip {
    @include position(absolute, null null null 50%);
    @include box-sizing(border-box);
    @include transition (all 0.2s ease-in-out);
    bottom: $tooltip-distance-from-item;
    background-color: $tooltip-background;
    border-radius: $base-border-radius;
    color: $tooltip-color;
    font-size: .9em; // Make sure you use -webkit-backface-visibility: hidden; on the body element to prevent 1px nudging bugs.
    line-height: 1.5em;
    margin-left: -($tooltip-width/2);
    opacity: 0;
    padding: 1em;
    box-shadow: $tooltip-shadow;
    text-align: center;
    visibility: hidden;
    min-width: $tooltip-width;
    z-index: 10;
    font-family: $serif;

    p {
      margin-bottom: 0;
    }

    &:after {
      @include position(absolute, null null null 46%);
      margin-left: -$tooltip-arrow-width;
      border: $tooltip-arrow-width solid transparent;
      color: $tooltip-background;
      content: '▼';
      text-shadow: $tooltip-shadow;
      font-size: 1.4em;
      pointer-events: none;
      bottom: $tooltip-arrow-distance-from-box;
    }
  }
}

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
staple-0.0.9 source/stylesheets/staple/_tooltip.scss
staple-0.0.8 source/stylesheets/staple/_tooltip.scss
staple-0.0.7 source/stylesheets/staple/_tooltip.scss
staple-0.0.6 source/stylesheets/staple/_tooltip.scss
staple-0.0.5 source/stylesheets/staple/_tooltip.scss
staple-0.0.4 source/stylesheets/staple/_tooltip.scss
staple-0.0.3 source/stylesheets/staple/_tooltip.scss
staple-0.0.2 source/stylesheets/staple/_tooltip.scss