diff options
| author | Volpeon <git@volpeon.ink> | 2026-03-08 07:32:25 +0100 |
|---|---|---|
| committer | Volpeon <git@volpeon.ink> | 2026-03-08 07:32:25 +0100 |
| commit | 3ff6eeb504a19b47cddaf050739922f60efbb74b (patch) | |
| tree | fd4f9b5bbf22e08553b14bbf0ff5bbd98bf7b0e9 /src/_utils.scss | |
| parent | Update _card-list.scss (diff) | |
| download | iro-design-3ff6eeb504a19b47cddaf050739922f60efbb74b.tar.gz iro-design-3ff6eeb504a19b47cddaf050739922f60efbb74b.tar.bz2 iro-design-3ff6eeb504a19b47cddaf050739922f60efbb74b.zip | |
Add aspect-ratio utils
Diffstat (limited to 'src/_utils.scss')
| -rw-r--r-- | src/_utils.scss | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/_utils.scss b/src/_utils.scss index 1e48194..ad7139d 100644 --- a/src/_utils.scss +++ b/src/_utils.scss | |||
| @@ -47,6 +47,12 @@ $-font-sizes: ( | |||
| 47 | 300: vars.$font-size--300, | 47 | 300: vars.$font-size--300, |
| 48 | ) !default; | 48 | ) !default; |
| 49 | 49 | ||
| 50 | $-aspect-ratios: ( | ||
| 51 | '1\\/1': 1 / 1, | ||
| 52 | '4\\/3': 4 / 3, | ||
| 53 | '5\\/3': 4 / 4, | ||
| 54 | ) !default; | ||
| 55 | |||
| 50 | @mixin styles { | 56 | @mixin styles { |
| 51 | @include bem.utility('d-block') { | 57 | @include bem.utility('d-block') { |
| 52 | display: block; | 58 | display: block; |
| @@ -389,6 +395,12 @@ $-font-sizes: ( | |||
| 389 | } | 395 | } |
| 390 | } | 396 | } |
| 391 | 397 | ||
| 398 | @each $mod, $value in $-aspect-ratios { | ||
| 399 | @include bem.utility('ar-#{$mod}') { | ||
| 400 | aspect-ratio: $value; | ||
| 401 | } | ||
| 402 | } | ||
| 403 | |||
| 392 | @include bem.utility('sr-only') { | 404 | @include bem.utility('sr-only') { |
| 393 | position: absolute; | 405 | position: absolute; |
| 394 | width: 1px; | 406 | width: 1px; |
