diff options
author | Volpeon <git@volpeon.ink> | 2022-06-15 07:15:57 +0200 |
---|---|---|
committer | Volpeon <git@volpeon.ink> | 2022-06-15 07:15:57 +0200 |
commit | 83ae14bbb8dd532f04c4214f762fca57199f4622 (patch) | |
tree | 149837121bea9b26517c1a1b6f1ef3e0cfd1ac5e | |
parent | Smaller indent on narrow viewports (diff) | |
download | iro-design-83ae14bbb8dd532f04c4214f762fca57199f4622.tar.gz iro-design-83ae14bbb8dd532f04c4214f762fca57199f4622.tar.bz2 iro-design-83ae14bbb8dd532f04c4214f762fca57199f4622.zip |
Narrower container
-rw-r--r-- | src/layouts/_container.scss | 25 | ||||
-rw-r--r-- | src/objects/_button.scss | 2 | ||||
-rw-r--r-- | tpl/layouts/container.pug | 2 |
3 files changed, 13 insertions, 16 deletions
diff --git a/src/layouts/_container.scss b/src/layouts/_container.scss index 52acfb8..d31a631 100644 --- a/src/layouts/_container.scss +++ b/src/layouts/_container.scss | |||
@@ -4,10 +4,11 @@ | |||
4 | @include iro.props-namespace('container') { | 4 | @include iro.props-namespace('container') { |
5 | @include iro.props-store(( | 5 | @include iro.props-store(( |
6 | --dims: ( | 6 | --dims: ( |
7 | --width: iro.fn-px-to-rem(620px), | 7 | --narrow-125: iro.fn-px-to-rem(800px), |
8 | --width-50: iro.fn-px-to-rem(320px), | 8 | --narrow: iro.fn-px-to-rem(600px), |
9 | --pad-x: fn.global-dim(--size --400), | 9 | --narrow-75: iro.fn-px-to-rem(400px), |
10 | --pad-y: fn.global-dim(--size --800), | 10 | --pad-x: fn.global-dim(--size --400), |
11 | --pad-y: fn.global-dim(--size --800), | ||
11 | ) | 12 | ) |
12 | ), 'dims'); | 13 | ), 'dims'); |
13 | 14 | ||
@@ -19,16 +20,12 @@ | |||
19 | ), 'sm'); | 20 | ), 'sm'); |
20 | 21 | ||
21 | @include iro.bem-layout(iro.props-namespace()) { | 22 | @include iro.bem-layout(iro.props-namespace()) { |
22 | @include iro.bem-modifier('narrow') { | 23 | @each $size in 'narrow-125' 'narrow' 'narrow-75' { |
23 | max-width: fn.dim(--width); | 24 | @include iro.bem-modifier($size) { |
24 | margin-right: auto; | 25 | max-width: fn.dim(--#{$size}); |
25 | margin-left: auto; | 26 | margin-right: auto; |
26 | } | 27 | margin-left: auto; |
27 | 28 | } | |
28 | @include iro.bem-modifier('narrow-50') { | ||
29 | max-width: fn.dim(--width-50); | ||
30 | margin-right: auto; | ||
31 | margin-left: auto; | ||
32 | } | 29 | } |
33 | 30 | ||
34 | @include iro.bem-modifier('pad-x') { | 31 | @include iro.bem-modifier('pad-x') { |
diff --git a/src/objects/_button.scss b/src/objects/_button.scss index 94711b7..f35bc50 100644 --- a/src/objects/_button.scss +++ b/src/objects/_button.scss | |||
@@ -143,7 +143,7 @@ | |||
143 | 143 | ||
144 | @include button-variant('secondary'); | 144 | @include button-variant('secondary'); |
145 | 145 | ||
146 | @each $mod in ('accent' 'primary') { | 146 | @each $mod in 'accent' 'primary' { |
147 | @include iro.bem-modifier($mod) { | 147 | @include iro.bem-modifier($mod) { |
148 | @include button-variant($mod); | 148 | @include button-variant($mod); |
149 | } | 149 | } |
diff --git a/tpl/layouts/container.pug b/tpl/layouts/container.pug index 0973b74..56c0b86 100644 --- a/tpl/layouts/container.pug +++ b/tpl/layouts/container.pug | |||
@@ -3,7 +3,7 @@ mixin container | |||
3 | let classes = { | 3 | let classes = { |
4 | 'l-container': true, | 4 | 'l-container': true, |
5 | 'l-container--narrow': attributes.narrow, | 5 | 'l-container--narrow': attributes.narrow, |
6 | 'l-container--narrow-50': attributes.narrow50, | 6 | 'l-container--narrow-75': attributes.narrow50, |
7 | 'u-themed': !!attributes.theme | 7 | 'u-themed': !!attributes.theme |
8 | } | 8 | } |
9 | if (!!attributes.theme) { | 9 | if (!!attributes.theme) { |