Last change
on this file since 6a3a178 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
417 bytes
|
Rev | Line | |
---|
[6a3a178] | 1 | // Credit: Nicolas Gallagher and SUIT CSS.
|
---|
| 2 |
|
---|
| 3 | .ratio {
|
---|
| 4 | position: relative;
|
---|
| 5 | width: 100%;
|
---|
| 6 |
|
---|
| 7 | &::before {
|
---|
| 8 | display: block;
|
---|
| 9 | padding-top: var(--#{$variable-prefix}aspect-ratio);
|
---|
| 10 | content: "";
|
---|
| 11 | }
|
---|
| 12 |
|
---|
| 13 | > * {
|
---|
| 14 | position: absolute;
|
---|
| 15 | top: 0;
|
---|
| 16 | left: 0;
|
---|
| 17 | width: 100%;
|
---|
| 18 | height: 100%;
|
---|
| 19 | }
|
---|
| 20 | }
|
---|
| 21 |
|
---|
| 22 | @each $key, $ratio in $aspect-ratios {
|
---|
| 23 | .ratio-#{$key} {
|
---|
| 24 | --#{$variable-prefix}aspect-ratio: #{$ratio};
|
---|
| 25 | }
|
---|
| 26 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.