Ghost theme (MIT license)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

143 lines
3.7 KiB

10 years ago
// Foundation by ZURB
// foundation.zurb.com
// Licensed under MIT Open Source
10 years ago
@import 'global';
10 years ago
//
// Tooltip Variables
//
$include-html-tooltip-classes: $include-html-classes !default;
$has-tip-border-bottom: dotted 1px $iron !default;
$has-tip-font-weight: $font-weight-bold !default;
$has-tip-font-color: $oil !default;
$has-tip-border-bottom-hover: dotted 1px scale-color($primary-color, $lightness: -55%) !default;
$has-tip-font-color-hover: $primary-color !default;
$has-tip-cursor-type: help !default;
$tooltip-padding: rem-calc(12) !default;
$tooltip-bg: $oil !default;
$tooltip-font-size: rem-calc(14) !default;
$tooltip-font-weight: $font-weight-normal !default;
$tooltip-font-color: $white !default;
$tooltip-line-height: 1.3 !default;
$tooltip-close-font-size: rem-calc(10) !default;
$tooltip-close-font-weight: $font-weight-normal !default;
$tooltip-close-font-color: $monsoon !default;
$tooltip-font-size-sml: rem-calc(14) !default;
$tooltip-radius: $global-radius !default;
$tooltip-rounded: $global-rounded !default;
$tooltip-pip-size: 5px !default;
$tooltip-max-width: 300px !default;
@include exports("tooltip") {
@if $include-html-tooltip-classes {
/* Tooltips */
.has-tip {
border-bottom: $has-tip-border-bottom;
10 years ago
color: $has-tip-font-color;
10 years ago
cursor: $has-tip-cursor-type;
font-weight: $has-tip-font-weight;
&:hover,
&:focus {
border-bottom: $has-tip-border-bottom-hover;
color: $has-tip-font-color-hover;
}
&.tip-left,
&.tip-right { float: none !important; }
}
.tooltip {
10 years ago
background: $tooltip-bg;
color: $tooltip-font-color;
10 years ago
display: none;
font-size: $tooltip-font-size;
10 years ago
font-weight: $tooltip-font-weight;
10 years ago
line-height: $tooltip-line-height;
max-width: $tooltip-max-width;
10 years ago
padding: $tooltip-padding;
position: absolute;
10 years ago
width: 100%;
10 years ago
z-index: 1006;
#{$default-float}: 50%;
10 years ago
10 years ago
> .nub {
border-color: transparent transparent $tooltip-bg transparent;
border: solid $tooltip-pip-size;
10 years ago
display: block;
height: 0;
pointer-events: none;
10 years ago
position: absolute;
top: -($tooltip-pip-size * 2);
width: 0;
#{$default-float}: $tooltip-pip-size;
10 years ago
&.rtl {
left: auto;
#{$opposite-direction}: $tooltip-pip-size;
}
}
&.radius {
@include radius($tooltip-radius);
}
&.round {
@include radius($tooltip-rounded);
10 years ago
> .nub {
10 years ago
left: 2rem;
}
}
&.opened {
border-bottom: $has-tip-border-bottom-hover !important;
10 years ago
color: $has-tip-font-color-hover !important;
10 years ago
}
}
.tap-to-close {
10 years ago
color: $tooltip-close-font-color;
10 years ago
display: block;
font-size: $tooltip-close-font-size;
font-weight: $tooltip-close-font-weight;
}
@media #{$small} {
.tooltip {
10 years ago
> .nub {
10 years ago
border-color: transparent transparent $tooltip-bg transparent;
top: -($tooltip-pip-size * 2);
}
&.tip-top>.nub {
border-color: $tooltip-bg transparent transparent transparent;
bottom: -($tooltip-pip-size * 2);
10 years ago
top: auto;
10 years ago
}
&.tip-left,
&.tip-right { float: none !important; }
&.tip-left>.nub {
border-color: transparent transparent transparent $tooltip-bg;
left: auto;
margin-top: -$tooltip-pip-size;
10 years ago
right: -($tooltip-pip-size * 2);
top: 50%;
10 years ago
}
&.tip-right>.nub {
border-color: transparent $tooltip-bg transparent transparent;
left: -($tooltip-pip-size * 2);
margin-top: -$tooltip-pip-size;
10 years ago
right: auto;
top: 50%;
10 years ago
}
}
}
}
}