mirror of
https://github.com/tenrok/bootstrap.git
synced 2026-06-20 20:00:36 +03: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
This commit is contained in:
+60
-60
@@ -2,49 +2,49 @@
|
||||
|
||||
.popover {
|
||||
// scss-docs-start popover-css-vars
|
||||
--#{$variable-prefix}popover-zindex: #{$zindex-popover};
|
||||
--#{$variable-prefix}popover-max-width: #{$popover-max-width};
|
||||
@include rfs($popover-font-size, --#{$variable-prefix}popover-font-size);
|
||||
--#{$variable-prefix}popover-bg: #{$popover-bg};
|
||||
--#{$variable-prefix}popover-border-width: #{$popover-border-width};
|
||||
--#{$variable-prefix}popover-border-color: #{$popover-border-color};
|
||||
--#{$variable-prefix}popover-border-radius: #{$popover-border-radius};
|
||||
--#{$variable-prefix}popover-box-shadow: #{$popover-box-shadow};
|
||||
--#{$variable-prefix}popover-header-padding-x: #{$popover-header-padding-x};
|
||||
--#{$variable-prefix}popover-header-padding-y: #{$popover-header-padding-y};
|
||||
--#{$variable-prefix}popover-header-color: #{$popover-header-color};
|
||||
--#{$variable-prefix}popover-header-bg: #{$popover-header-bg};
|
||||
--#{$variable-prefix}popover-body-padding-x: #{$popover-body-padding-x};
|
||||
--#{$variable-prefix}popover-body-padding-y: #{$popover-body-padding-y};
|
||||
--#{$variable-prefix}popover-body-color: #{$popover-body-color};
|
||||
--#{$variable-prefix}popover-arrow-width: #{$popover-arrow-width};
|
||||
--#{$variable-prefix}popover-arrow-height: #{$popover-arrow-height};
|
||||
--#{$variable-prefix}popover-arrow-border: var(--#{$variable-prefix}popover-border-color);
|
||||
--#{$prefix}popover-zindex: #{$zindex-popover};
|
||||
--#{$prefix}popover-max-width: #{$popover-max-width};
|
||||
@include rfs($popover-font-size, --#{$prefix}popover-font-size);
|
||||
--#{$prefix}popover-bg: #{$popover-bg};
|
||||
--#{$prefix}popover-border-width: #{$popover-border-width};
|
||||
--#{$prefix}popover-border-color: #{$popover-border-color};
|
||||
--#{$prefix}popover-border-radius: #{$popover-border-radius};
|
||||
--#{$prefix}popover-box-shadow: #{$popover-box-shadow};
|
||||
--#{$prefix}popover-header-padding-x: #{$popover-header-padding-x};
|
||||
--#{$prefix}popover-header-padding-y: #{$popover-header-padding-y};
|
||||
--#{$prefix}popover-header-color: #{$popover-header-color};
|
||||
--#{$prefix}popover-header-bg: #{$popover-header-bg};
|
||||
--#{$prefix}popover-body-padding-x: #{$popover-body-padding-x};
|
||||
--#{$prefix}popover-body-padding-y: #{$popover-body-padding-y};
|
||||
--#{$prefix}popover-body-color: #{$popover-body-color};
|
||||
--#{$prefix}popover-arrow-width: #{$popover-arrow-width};
|
||||
--#{$prefix}popover-arrow-height: #{$popover-arrow-height};
|
||||
--#{$prefix}popover-arrow-border: var(--#{$prefix}popover-border-color);
|
||||
// scss-docs-end popover-css-vars
|
||||
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0 #{"/* rtl:ignore */"};
|
||||
z-index: var(--#{$variable-prefix}popover-zindex);
|
||||
z-index: var(--#{$prefix}popover-zindex);
|
||||
display: block;
|
||||
max-width: var(--#{$variable-prefix}popover-max-width);
|
||||
max-width: var(--#{$prefix}popover-max-width);
|
||||
// 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();
|
||||
font-size: var(--#{$variable-prefix}popover-font-size);
|
||||
font-size: var(--#{$prefix}popover-font-size);
|
||||
// Allow breaking very long words so they don't overflow the popover's bounds
|
||||
word-wrap: break-word;
|
||||
background-color: var(--#{$variable-prefix}popover-bg);
|
||||
background-color: var(--#{$prefix}popover-bg);
|
||||
background-clip: padding-box;
|
||||
border: var(--#{$variable-prefix}popover-border-width) solid var(--#{$variable-prefix}popover-border-color);
|
||||
@include border-radius(var(--#{$variable-prefix}popover-border-radius));
|
||||
@include box-shadow(var(--#{$variable-prefix}popover-box-shadow));
|
||||
border: var(--#{$prefix}popover-border-width) solid var(--#{$prefix}popover-border-color);
|
||||
@include border-radius(var(--#{$prefix}popover-border-radius));
|
||||
@include box-shadow(var(--#{$prefix}popover-box-shadow));
|
||||
|
||||
.popover-arrow {
|
||||
position: absolute;
|
||||
display: block;
|
||||
width: var(--#{$variable-prefix}popover-arrow-width);
|
||||
height: var(--#{$variable-prefix}popover-arrow-height);
|
||||
width: var(--#{$prefix}popover-arrow-width);
|
||||
height: var(--#{$prefix}popover-arrow-height);
|
||||
|
||||
&::before,
|
||||
&::after {
|
||||
@@ -60,21 +60,21 @@
|
||||
|
||||
.bs-popover-top {
|
||||
> .popover-arrow {
|
||||
bottom: calc((var(--#{$variable-prefix}popover-arrow-height)) * -1); // stylelint-disable-line function-disallowed-list
|
||||
bottom: calc((var(--#{$prefix}popover-arrow-height)) * -1); // stylelint-disable-line function-disallowed-list
|
||||
|
||||
&::before,
|
||||
&::after {
|
||||
border-width: var(--#{$variable-prefix}popover-arrow-height) calc(var(--#{$variable-prefix}popover-arrow-width) * .5) 0; // stylelint-disable-line function-disallowed-list
|
||||
border-width: var(--#{$prefix}popover-arrow-height) calc(var(--#{$prefix}popover-arrow-width) * .5) 0; // stylelint-disable-line function-disallowed-list
|
||||
}
|
||||
|
||||
&::before {
|
||||
bottom: 0;
|
||||
border-top-color: var(--#{$variable-prefix}popover-arrow-border);
|
||||
border-top-color: var(--#{$prefix}popover-arrow-border);
|
||||
}
|
||||
|
||||
&::after {
|
||||
bottom: var(--#{$variable-prefix}popover-border-width);
|
||||
border-top-color: var(--#{$variable-prefix}popover-bg);
|
||||
bottom: var(--#{$prefix}popover-border-width);
|
||||
border-top-color: var(--#{$prefix}popover-bg);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -82,23 +82,23 @@
|
||||
/* rtl:begin:ignore */
|
||||
.bs-popover-end {
|
||||
> .popover-arrow {
|
||||
left: calc((var(--#{$variable-prefix}popover-arrow-height)) * -1); // stylelint-disable-line function-disallowed-list
|
||||
width: var(--#{$variable-prefix}popover-arrow-height);
|
||||
height: var(--#{$variable-prefix}popover-arrow-width);
|
||||
left: calc((var(--#{$prefix}popover-arrow-height)) * -1); // stylelint-disable-line function-disallowed-list
|
||||
width: var(--#{$prefix}popover-arrow-height);
|
||||
height: var(--#{$prefix}popover-arrow-width);
|
||||
|
||||
&::before,
|
||||
&::after {
|
||||
border-width: calc(var(--#{$variable-prefix}popover-arrow-width) * .5) var(--#{$variable-prefix}popover-arrow-height) calc(var(--#{$variable-prefix}popover-arrow-width) * .5) 0; // stylelint-disable-line function-disallowed-list
|
||||
border-width: calc(var(--#{$prefix}popover-arrow-width) * .5) var(--#{$prefix}popover-arrow-height) calc(var(--#{$prefix}popover-arrow-width) * .5) 0; // stylelint-disable-line function-disallowed-list
|
||||
}
|
||||
|
||||
&::before {
|
||||
left: 0;
|
||||
border-right-color: var(--#{$variable-prefix}popover-arrow-border);
|
||||
border-right-color: var(--#{$prefix}popover-arrow-border);
|
||||
}
|
||||
|
||||
&::after {
|
||||
left: var(--#{$variable-prefix}popover-border-width);
|
||||
border-right-color: var(--#{$variable-prefix}popover-bg);
|
||||
left: var(--#{$prefix}popover-border-width);
|
||||
border-right-color: var(--#{$prefix}popover-bg);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -107,21 +107,21 @@
|
||||
|
||||
.bs-popover-bottom {
|
||||
> .popover-arrow {
|
||||
top: calc((var(--#{$variable-prefix}popover-arrow-height)) * -1); // stylelint-disable-line function-disallowed-list
|
||||
top: calc((var(--#{$prefix}popover-arrow-height)) * -1); // stylelint-disable-line function-disallowed-list
|
||||
|
||||
&::before,
|
||||
&::after {
|
||||
border-width: 0 calc(var(--#{$variable-prefix}popover-arrow-width) * .5) var(--#{$variable-prefix}popover-arrow-height); // stylelint-disable-line function-disallowed-list
|
||||
border-width: 0 calc(var(--#{$prefix}popover-arrow-width) * .5) var(--#{$prefix}popover-arrow-height); // stylelint-disable-line function-disallowed-list
|
||||
}
|
||||
|
||||
&::before {
|
||||
top: 0;
|
||||
border-bottom-color: var(--#{$variable-prefix}popover-arrow-border);
|
||||
border-bottom-color: var(--#{$prefix}popover-arrow-border);
|
||||
}
|
||||
|
||||
&::after {
|
||||
top: var(--#{$variable-prefix}popover-border-width);
|
||||
border-bottom-color: var(--#{$variable-prefix}popover-bg);
|
||||
top: var(--#{$prefix}popover-border-width);
|
||||
border-bottom-color: var(--#{$prefix}popover-bg);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -131,33 +131,33 @@
|
||||
top: 0;
|
||||
left: 50%;
|
||||
display: block;
|
||||
width: var(--#{$variable-prefix}popover-arrow-width);
|
||||
margin-left: calc(var(--#{$variable-prefix}popover-arrow-width) * -.5); // stylelint-disable-line function-disallowed-list
|
||||
width: var(--#{$prefix}popover-arrow-width);
|
||||
margin-left: calc(var(--#{$prefix}popover-arrow-width) * -.5); // stylelint-disable-line function-disallowed-list
|
||||
content: "";
|
||||
border-bottom: var(--#{$variable-prefix}popover-border-width) solid var(--#{$variable-prefix}popover-header-bg);
|
||||
border-bottom: var(--#{$prefix}popover-border-width) solid var(--#{$prefix}popover-header-bg);
|
||||
}
|
||||
}
|
||||
|
||||
/* rtl:begin:ignore */
|
||||
.bs-popover-start {
|
||||
> .popover-arrow {
|
||||
right: calc((var(--#{$variable-prefix}popover-arrow-height)) * -1); // stylelint-disable-line function-disallowed-list
|
||||
width: var(--#{$variable-prefix}popover-arrow-height);
|
||||
height: var(--#{$variable-prefix}popover-arrow-width);
|
||||
right: calc((var(--#{$prefix}popover-arrow-height)) * -1); // stylelint-disable-line function-disallowed-list
|
||||
width: var(--#{$prefix}popover-arrow-height);
|
||||
height: var(--#{$prefix}popover-arrow-width);
|
||||
|
||||
&::before,
|
||||
&::after {
|
||||
border-width: calc(var(--#{$variable-prefix}popover-arrow-width) * .5) 0 calc(var(--#{$variable-prefix}popover-arrow-width) * .5) var(--#{$variable-prefix}popover-arrow-height); // stylelint-disable-line function-disallowed-list
|
||||
border-width: calc(var(--#{$prefix}popover-arrow-width) * .5) 0 calc(var(--#{$prefix}popover-arrow-width) * .5) var(--#{$prefix}popover-arrow-height); // stylelint-disable-line function-disallowed-list
|
||||
}
|
||||
|
||||
&::before {
|
||||
right: 0;
|
||||
border-left-color: var(--#{$variable-prefix}popover-arrow-border);
|
||||
border-left-color: var(--#{$prefix}popover-arrow-border);
|
||||
}
|
||||
|
||||
&::after {
|
||||
right: var(--#{$variable-prefix}popover-border-width);
|
||||
border-left-color: var(--#{$variable-prefix}popover-bg);
|
||||
right: var(--#{$prefix}popover-border-width);
|
||||
border-left-color: var(--#{$prefix}popover-bg);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -181,12 +181,12 @@
|
||||
|
||||
// Offset the popover to account for the popover arrow
|
||||
.popover-header {
|
||||
padding: var(--#{$variable-prefix}popover-header-padding-y) var(--#{$variable-prefix}popover-header-padding-x);
|
||||
padding: var(--#{$prefix}popover-header-padding-y) var(--#{$prefix}popover-header-padding-x);
|
||||
margin-bottom: 0; // Reset the default from Reboot
|
||||
@include font-size($font-size-base);
|
||||
color: var(--#{$variable-prefix}popover-header-color);
|
||||
background-color: var(--#{$variable-prefix}popover-header-bg);
|
||||
border-bottom: var(--#{$variable-prefix}popover-border-width) solid var(--#{$variable-prefix}popover-border-color);
|
||||
color: var(--#{$prefix}popover-header-color);
|
||||
background-color: var(--#{$prefix}popover-header-bg);
|
||||
border-bottom: var(--#{$prefix}popover-border-width) solid var(--#{$prefix}popover-border-color);
|
||||
@include border-top-radius($popover-inner-border-radius);
|
||||
|
||||
&:empty {
|
||||
@@ -195,6 +195,6 @@
|
||||
}
|
||||
|
||||
.popover-body {
|
||||
padding: var(--#{$variable-prefix}popover-body-padding-y) var(--#{$variable-prefix}popover-body-padding-x);
|
||||
color: var(--#{$variable-prefix}popover-body-color);
|
||||
padding: var(--#{$prefix}popover-body-padding-y) var(--#{$prefix}popover-body-padding-x);
|
||||
color: var(--#{$prefix}popover-body-color);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user