1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-26 06:44:35 +02:00

Move ratio helper to utility API with aspect-ratio property

This commit is contained in:
Mark Otto
2023-08-06 22:48:17 -07:00
parent 764bd8de14
commit 7cd1a00a05
8 changed files with 67 additions and 133 deletions

View File

@@ -1,26 +0,0 @@
// 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};
}
}