mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-31 00:59:51 +02:00
Rename the classes and docs page, update everything accordingly
This commit is contained in:
30
scss/helpers/_ratio.scss
Normal file
30
scss/helpers/_ratio.scss
Normal file
@@ -0,0 +1,30 @@
|
||||
// Credit: Nicolas Gallagher and SUIT CSS.
|
||||
|
||||
.ratio {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
|
||||
&::before {
|
||||
display: block;
|
||||
padding-top: var(--aspect-ratio);
|
||||
content: "";
|
||||
}
|
||||
|
||||
.ratio-item,
|
||||
iframe,
|
||||
embed,
|
||||
object,
|
||||
video {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
@each $key, $ratio in $aspect-ratios {
|
||||
.ratio-#{$key} {
|
||||
--aspect-ratio: #{$ratio};
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user