mirror of
https://github.com/twbs/bootstrap.git
synced 2024-12-01 13:24:25 +01:00
acf6ea74a7
* 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
27 lines
399 B
SCSS
27 lines
399 B
SCSS
// Credit: Nicolas Gallagher and SUIT CSS.
|
|
|
|
.ratio {
|
|
position: relative;
|
|
width: 100%;
|
|
|
|
&::before {
|
|
display: block;
|
|
padding-top: var(--#{$prefix}aspect-ratio);
|
|
content: "";
|
|
}
|
|
|
|
> * {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
}
|
|
}
|
|
|
|
@each $key, $ratio in $aspect-ratios {
|
|
.ratio-#{$key} {
|
|
--#{$prefix}aspect-ratio: #{$ratio};
|
|
}
|
|
}
|