2021-09-08 23:18:22 -04:00
|
|
|
// stylelint-disable custom-property-empty-line-before
|
|
|
|
|
2014-12-02 17:02:35 -05:00
|
|
|
// Base class
|
|
|
|
.tooltip {
|
2021-07-29 02:21:53 -04:00
|
|
|
// scss-docs-start tooltip-css-vars
|
Add additional root variables, rename `$variable-prefix` to `$prefix` (#35981)
* Add additional root variables, rename $variable-prefix to $prefix
- Adds new root CSS variables for border-radius, border-width, border-color, and border-style
- Adds new root CSS variables for heading-color, link-colors, code color, and highlight color
- Replaces most instances of Sass variables (for border-radius, border-color, border-style, and border-width) for CSS variables inside _variables.scss
- Updates $mark-padding to be an even pixel number
- Renames $variable-prefix to $prefix throughout
* Bundlewatch
2022-03-13 13:13:09 -04:00
|
|
|
--#{$prefix}tooltip-zindex: #{$zindex-tooltip};
|
|
|
|
--#{$prefix}tooltip-max-width: #{$tooltip-max-width};
|
|
|
|
--#{$prefix}tooltip-padding-x: #{$tooltip-padding-x};
|
|
|
|
--#{$prefix}tooltip-padding-y: #{$tooltip-padding-y};
|
|
|
|
--#{$prefix}tooltip-margin: #{$tooltip-margin};
|
|
|
|
@include rfs($tooltip-font-size, --#{$prefix}tooltip-font-size);
|
|
|
|
--#{$prefix}tooltip-color: #{$tooltip-color};
|
|
|
|
--#{$prefix}tooltip-bg: #{$tooltip-bg};
|
|
|
|
--#{$prefix}tooltip-border-radius: #{$tooltip-border-radius};
|
|
|
|
--#{$prefix}tooltip-opacity: #{$tooltip-opacity};
|
|
|
|
--#{$prefix}tooltip-arrow-width: #{$tooltip-arrow-width};
|
|
|
|
--#{$prefix}tooltip-arrow-height: #{$tooltip-arrow-height};
|
2021-09-08 14:01:35 -04:00
|
|
|
// scss-docs-end tooltip-css-vars
|
2021-07-29 02:21:53 -04:00
|
|
|
|
Add additional root variables, rename `$variable-prefix` to `$prefix` (#35981)
* Add additional root variables, rename $variable-prefix to $prefix
- Adds new root CSS variables for border-radius, border-width, border-color, and border-style
- Adds new root CSS variables for heading-color, link-colors, code color, and highlight color
- Replaces most instances of Sass variables (for border-radius, border-color, border-style, and border-width) for CSS variables inside _variables.scss
- Updates $mark-padding to be an even pixel number
- Renames $variable-prefix to $prefix throughout
* Bundlewatch
2022-03-13 13:13:09 -04:00
|
|
|
z-index: var(--#{$prefix}tooltip-zindex);
|
2014-12-02 17:02:35 -05:00
|
|
|
display: block;
|
2022-05-04 09:31:57 -04:00
|
|
|
padding: var(--#{$prefix}tooltip-arrow-height);
|
Add additional root variables, rename `$variable-prefix` to `$prefix` (#35981)
* Add additional root variables, rename $variable-prefix to $prefix
- Adds new root CSS variables for border-radius, border-width, border-color, and border-style
- Adds new root CSS variables for heading-color, link-colors, code color, and highlight color
- Replaces most instances of Sass variables (for border-radius, border-color, border-style, and border-width) for CSS variables inside _variables.scss
- Updates $mark-padding to be an even pixel number
- Renames $variable-prefix to $prefix throughout
* Bundlewatch
2022-03-13 13:13:09 -04:00
|
|
|
margin: var(--#{$prefix}tooltip-margin);
|
2022-04-12 21:16:18 -04:00
|
|
|
@include deprecate("`$tooltip-margin`", "v5", "v5.x", );
|
2015-06-19 02:56:43 -04:00
|
|
|
// Our parent element can be arbitrary since tooltips are by default inserted as a sibling of their target element.
|
|
|
|
// So reset our font and text properties to avoid inheriting weird values.
|
|
|
|
@include reset-text();
|
Add additional root variables, rename `$variable-prefix` to `$prefix` (#35981)
* Add additional root variables, rename $variable-prefix to $prefix
- Adds new root CSS variables for border-radius, border-width, border-color, and border-style
- Adds new root CSS variables for heading-color, link-colors, code color, and highlight color
- Replaces most instances of Sass variables (for border-radius, border-color, border-style, and border-width) for CSS variables inside _variables.scss
- Updates $mark-padding to be an even pixel number
- Renames $variable-prefix to $prefix throughout
* Bundlewatch
2022-03-13 13:13:09 -04:00
|
|
|
@include font-size(var(--#{$prefix}tooltip-font-size));
|
2016-01-18 01:23:29 -05:00
|
|
|
// Allow breaking very long words so they don't overflow the tooltip's bounds
|
|
|
|
word-wrap: break-word;
|
2014-12-02 17:02:35 -05:00
|
|
|
opacity: 0;
|
|
|
|
|
Add additional root variables, rename `$variable-prefix` to `$prefix` (#35981)
* Add additional root variables, rename $variable-prefix to $prefix
- Adds new root CSS variables for border-radius, border-width, border-color, and border-style
- Adds new root CSS variables for heading-color, link-colors, code color, and highlight color
- Replaces most instances of Sass variables (for border-radius, border-color, border-style, and border-width) for CSS variables inside _variables.scss
- Updates $mark-padding to be an even pixel number
- Renames $variable-prefix to $prefix throughout
* Bundlewatch
2022-03-13 13:13:09 -04:00
|
|
|
&.show { opacity: var(--#{$prefix}tooltip-opacity); }
|
2014-12-19 21:35:10 -05:00
|
|
|
|
2019-02-11 05:27:14 -05:00
|
|
|
.tooltip-arrow {
|
2017-05-23 08:17:07 -04:00
|
|
|
display: block;
|
Add additional root variables, rename `$variable-prefix` to `$prefix` (#35981)
* Add additional root variables, rename $variable-prefix to $prefix
- Adds new root CSS variables for border-radius, border-width, border-color, and border-style
- Adds new root CSS variables for heading-color, link-colors, code color, and highlight color
- Replaces most instances of Sass variables (for border-radius, border-color, border-style, and border-width) for CSS variables inside _variables.scss
- Updates $mark-padding to be an even pixel number
- Renames $variable-prefix to $prefix throughout
* Bundlewatch
2022-03-13 13:13:09 -04:00
|
|
|
width: var(--#{$prefix}tooltip-arrow-width);
|
|
|
|
height: var(--#{$prefix}tooltip-arrow-height);
|
2017-05-23 08:17:07 -04:00
|
|
|
|
2017-12-27 00:56:48 -05:00
|
|
|
&::before {
|
|
|
|
position: absolute;
|
|
|
|
content: "";
|
|
|
|
border-color: transparent;
|
|
|
|
border-style: solid;
|
|
|
|
}
|
2017-10-10 09:46:43 -04:00
|
|
|
}
|
2017-12-27 00:56:48 -05:00
|
|
|
}
|
2017-10-10 09:46:43 -04:00
|
|
|
|
2022-05-04 09:31:57 -04:00
|
|
|
.bs-tooltip-top .tooltip-arrow {
|
|
|
|
bottom: 0;
|
2015-05-12 02:32:37 -04:00
|
|
|
|
2022-05-04 09:31:57 -04:00
|
|
|
&::before {
|
|
|
|
top: -1px;
|
|
|
|
border-width: var(--#{$prefix}tooltip-arrow-height) calc(var(--#{$prefix}tooltip-arrow-width) * .5) 0; // stylelint-disable-line function-disallowed-list
|
|
|
|
border-top-color: var(--#{$prefix}tooltip-bg);
|
2015-05-12 02:32:37 -04:00
|
|
|
}
|
2017-12-27 00:56:48 -05:00
|
|
|
}
|
|
|
|
|
2022-02-28 11:04:29 -05:00
|
|
|
/* rtl:begin:ignore */
|
2022-05-04 09:31:57 -04:00
|
|
|
.bs-tooltip-end .tooltip-arrow {
|
|
|
|
left: 0;
|
|
|
|
width: var(--#{$prefix}tooltip-arrow-height);
|
|
|
|
height: var(--#{$prefix}tooltip-arrow-width);
|
|
|
|
|
|
|
|
&::before {
|
|
|
|
right: -1px;
|
|
|
|
border-width: calc(var(--#{$prefix}tooltip-arrow-width) * .5) var(--#{$prefix}tooltip-arrow-height) calc(var(--#{$prefix}tooltip-arrow-width) * .5) 0; // stylelint-disable-line function-disallowed-list
|
|
|
|
border-right-color: var(--#{$prefix}tooltip-bg);
|
2015-05-12 02:32:37 -04:00
|
|
|
}
|
2017-12-27 00:56:48 -05:00
|
|
|
}
|
2015-05-12 02:32:37 -04:00
|
|
|
|
2022-02-28 11:04:29 -05:00
|
|
|
/* rtl:end:ignore */
|
|
|
|
|
2022-05-04 09:31:57 -04:00
|
|
|
.bs-tooltip-bottom .tooltip-arrow {
|
|
|
|
top: 0;
|
2017-12-27 00:56:48 -05:00
|
|
|
|
2022-05-04 09:31:57 -04:00
|
|
|
&::before {
|
|
|
|
bottom: -1px;
|
|
|
|
border-width: 0 calc(var(--#{$prefix}tooltip-arrow-width) * .5) var(--#{$prefix}tooltip-arrow-height); // stylelint-disable-line function-disallowed-list
|
|
|
|
border-bottom-color: var(--#{$prefix}tooltip-bg);
|
2015-05-12 02:32:37 -04:00
|
|
|
}
|
2017-12-27 00:56:48 -05:00
|
|
|
}
|
|
|
|
|
2022-02-28 11:04:29 -05:00
|
|
|
/* rtl:begin:ignore */
|
2022-05-04 09:31:57 -04:00
|
|
|
.bs-tooltip-start .tooltip-arrow {
|
|
|
|
right: 0;
|
|
|
|
width: var(--#{$prefix}tooltip-arrow-height);
|
|
|
|
height: var(--#{$prefix}tooltip-arrow-width);
|
|
|
|
|
|
|
|
&::before {
|
|
|
|
left: -1px;
|
|
|
|
border-width: calc(var(--#{$prefix}tooltip-arrow-width) * .5) 0 calc(var(--#{$prefix}tooltip-arrow-width) * .5) var(--#{$prefix}tooltip-arrow-height); // stylelint-disable-line function-disallowed-list
|
|
|
|
border-left-color: var(--#{$prefix}tooltip-bg);
|
2015-05-12 02:32:37 -04:00
|
|
|
}
|
2017-12-27 00:56:48 -05:00
|
|
|
}
|
|
|
|
|
2022-02-28 11:04:29 -05:00
|
|
|
/* rtl:end:ignore */
|
|
|
|
|
2017-12-27 00:56:48 -05:00
|
|
|
.bs-tooltip-auto {
|
2020-06-19 04:17:01 -04:00
|
|
|
&[data-popper-placement^="top"] {
|
2017-12-27 00:56:48 -05:00
|
|
|
@extend .bs-tooltip-top;
|
|
|
|
}
|
2020-06-19 04:17:01 -04:00
|
|
|
&[data-popper-placement^="right"] {
|
2020-06-26 10:06:20 -04:00
|
|
|
@extend .bs-tooltip-end;
|
2017-12-27 00:56:48 -05:00
|
|
|
}
|
2020-06-19 04:17:01 -04:00
|
|
|
&[data-popper-placement^="bottom"] {
|
2017-12-27 00:56:48 -05:00
|
|
|
@extend .bs-tooltip-bottom;
|
|
|
|
}
|
2020-06-19 04:17:01 -04:00
|
|
|
&[data-popper-placement^="left"] {
|
2020-06-26 10:06:20 -04:00
|
|
|
@extend .bs-tooltip-start;
|
2017-05-24 07:48:32 -04:00
|
|
|
}
|
2014-12-02 17:02:35 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
// Wrapper for the tooltip content
|
|
|
|
.tooltip-inner {
|
Add additional root variables, rename `$variable-prefix` to `$prefix` (#35981)
* Add additional root variables, rename $variable-prefix to $prefix
- Adds new root CSS variables for border-radius, border-width, border-color, and border-style
- Adds new root CSS variables for heading-color, link-colors, code color, and highlight color
- Replaces most instances of Sass variables (for border-radius, border-color, border-style, and border-width) for CSS variables inside _variables.scss
- Updates $mark-padding to be an even pixel number
- Renames $variable-prefix to $prefix throughout
* Bundlewatch
2022-03-13 13:13:09 -04:00
|
|
|
max-width: var(--#{$prefix}tooltip-max-width);
|
|
|
|
padding: var(--#{$prefix}tooltip-padding-y) var(--#{$prefix}tooltip-padding-x);
|
|
|
|
color: var(--#{$prefix}tooltip-color);
|
2014-12-02 17:02:35 -05:00
|
|
|
text-align: center;
|
Add additional root variables, rename `$variable-prefix` to `$prefix` (#35981)
* Add additional root variables, rename $variable-prefix to $prefix
- Adds new root CSS variables for border-radius, border-width, border-color, and border-style
- Adds new root CSS variables for heading-color, link-colors, code color, and highlight color
- Replaces most instances of Sass variables (for border-radius, border-color, border-style, and border-width) for CSS variables inside _variables.scss
- Updates $mark-padding to be an even pixel number
- Renames $variable-prefix to $prefix throughout
* Bundlewatch
2022-03-13 13:13:09 -04:00
|
|
|
background-color: var(--#{$prefix}tooltip-bg);
|
|
|
|
border-radius: var(--#{$prefix}tooltip-border-radius, 0); // stylelint-disable-line property-disallowed-list
|
2014-12-02 17:02:35 -05:00
|
|
|
}
|