diff options
author | Volpeon <git@volpeon.ink> | 2024-10-17 16:45:00 +0200 |
---|---|---|
committer | Volpeon <git@volpeon.ink> | 2024-10-17 16:45:00 +0200 |
commit | 50f6acc739f24bfa2ca080d08e90d82f8fa83543 (patch) | |
tree | 404dbe97d34b7e4fc3293c8e6a8c92d9941ac51e /src_old/layouts/_form.scss | |
parent | Colors (diff) | |
download | iro-design-50f6acc739f24bfa2ca080d08e90d82f8fa83543.tar.gz iro-design-50f6acc739f24bfa2ca080d08e90d82f8fa83543.tar.bz2 iro-design-50f6acc739f24bfa2ca080d08e90d82f8fa83543.zip |
Revamped variable management
Diffstat (limited to 'src_old/layouts/_form.scss')
-rw-r--r-- | src_old/layouts/_form.scss | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/src_old/layouts/_form.scss b/src_old/layouts/_form.scss new file mode 100644 index 0000000..f6b60ea --- /dev/null +++ b/src_old/layouts/_form.scss | |||
@@ -0,0 +1,62 @@ | |||
1 | @use 'iro-sass/src/index' as iro; | ||
2 | @use '../functions' as fn; | ||
3 | |||
4 | // @use '../objects/field-label'; | ||
5 | |||
6 | @include iro.props-namespace('form') { | ||
7 | @include iro.props-store(( | ||
8 | --dims: ( | ||
9 | --item-spacing-b: fn.global-dim(--size --325), | ||
10 | --label-spacing-i: fn.global-dim(--size --325), | ||
11 | --hint-font-size: fn.global-dim(--font-size --75), | ||
12 | ), | ||
13 | )); | ||
14 | |||
15 | @include iro.bem-layout(iro.props-namespace()) { | ||
16 | display: flex; | ||
17 | flex-direction: column; | ||
18 | gap: fn.dim(--item-spacing-b) fn.dim(--label-spacing-i); | ||
19 | |||
20 | @include iro.bem-elem('item') { | ||
21 | display: block; | ||
22 | } | ||
23 | |||
24 | @include iro.bem-elem('item-content') { | ||
25 | @include iro.bem-modifier('align-start') { | ||
26 | align-self: start; | ||
27 | } | ||
28 | } | ||
29 | |||
30 | @include iro.bem-modifier('row') { | ||
31 | flex-direction: row; | ||
32 | align-items: flex-end; | ||
33 | } | ||
34 | |||
35 | @include iro.bem-modifier('labels-start', 'labels-end') { | ||
36 | display: grid; | ||
37 | grid-template-columns: auto 1fr; | ||
38 | grid-template-rows: auto; | ||
39 | align-items: baseline; | ||
40 | |||
41 | @include iro.bem-elem('item') { | ||
42 | display: contents; | ||
43 | } | ||
44 | |||
45 | @include iro.bem-elem('item-label') { | ||
46 | grid-column: 1; | ||
47 | padding-inline-end: 0; | ||
48 | } | ||
49 | |||
50 | @include iro.bem-elem('item-content') { | ||
51 | grid-column: 2; | ||
52 | margin-block-start: 0; | ||
53 | } | ||
54 | } | ||
55 | |||
56 | @include iro.bem-modifier('labels-end') { | ||
57 | @include iro.bem-elem('item-label') { | ||
58 | text-align: end; | ||
59 | } | ||
60 | } | ||
61 | } | ||
62 | } | ||