2014-03-07 08:18:13 +01:00
|
|
|
// Credit: Nicolas Gallagher and SUIT CSS.
|
|
|
|
|
2020-09-23 01:30:00 +02:00
|
|
|
.ratio {
|
2014-03-07 08:18:13 +01:00
|
|
|
position: relative;
|
2016-04-15 10:40:51 +02:00
|
|
|
width: 100%;
|
2014-03-07 08:18:13 +01:00
|
|
|
|
2016-04-15 10:40:51 +02:00
|
|
|
&::before {
|
|
|
|
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 18:13:09 +01:00
|
|
|
padding-top: var(--#{$prefix}aspect-ratio);
|
2016-04-15 10:40:51 +02:00
|
|
|
content: "";
|
|
|
|
}
|
|
|
|
|
2020-09-23 20:06:21 +02:00
|
|
|
> * {
|
2014-03-07 08:18:13 +01:00
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
2014-12-11 21:05:29 +01:00
|
|
|
left: 0;
|
2014-03-07 08:18:13 +01:00
|
|
|
width: 100%;
|
2014-12-11 21:05:29 +01:00
|
|
|
height: 100%;
|
2014-03-07 08:18:13 +01:00
|
|
|
}
|
2015-02-02 18:26:30 +01:00
|
|
|
}
|
2014-03-07 08:18:13 +01:00
|
|
|
|
2020-09-23 01:30:00 +02:00
|
|
|
@each $key, $ratio in $aspect-ratios {
|
|
|
|
.ratio-#{$key} {
|
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 18:13:09 +01:00
|
|
|
--#{$prefix}aspect-ratio: #{$ratio};
|
2016-04-15 10:40:51 +02:00
|
|
|
}
|
2015-11-24 04:50:38 +01:00
|
|
|
}
|