// Credit: Nicolas Gallagher and SUIT CSS. .ratio { position: relative; width: 100%; &::before { display: block; padding-top: var(--#{$variable-prefix}aspect-ratio); content: ""; } > * { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } } @each $key, $ratio in $aspect-ratios { .ratio-#{$key} { --#{$variable-prefix}aspect-ratio: #{$ratio}; } }
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
_clearfix.scss | File | 37 B | 0644 |
|
_colored-links.scss | File | 326 B | 0644 |
|
_position.scss | File | 501 B | 0644 |
|
_ratio.scss | File | 417 B | 0644 |
|
_stretched-link.scss | File | 223 B | 0644 |
|
_text-truncation.scss | File | 73 B | 0644 |
|
_visually-hidden.scss | File | 136 B | 0644 |
|