diff options
-rw-r--r-- | src/_utils.scss | 4 | ||||
-rw-r--r-- | src/layouts/_form.scss | 6 | ||||
-rw-r--r-- | src/objects/_dialog.scss | 1 | ||||
-rw-r--r-- | src/objects/_field-label.scss | 8 | ||||
-rw-r--r-- | tpl/index.pug | 17 |
5 files changed, 14 insertions, 22 deletions
diff --git a/src/_utils.scss b/src/_utils.scss index 8ac1b01..ce0220a 100644 --- a/src/_utils.scss +++ b/src/_utils.scss | |||
@@ -63,7 +63,7 @@ $dirs: ( | |||
63 | margin#{$suffix}: auto; | 63 | margin#{$suffix}: auto; |
64 | } | 64 | } |
65 | 65 | ||
66 | @each $size in (0 50 100) { | 66 | @each $size in (0 10 50 100 200) { |
67 | @include iro.bem-utility('m#{$dir}-#{$size}') { | 67 | @include iro.bem-utility('m#{$dir}-#{$size}') { |
68 | margin#{$suffix}: fn.global-dim(--size --#{$size}); | 68 | margin#{$suffix}: fn.global-dim(--size --#{$size}); |
69 | } | 69 | } |
@@ -75,7 +75,7 @@ $dirs: ( | |||
75 | padding#{$suffix}: auto; | 75 | padding#{$suffix}: auto; |
76 | } | 76 | } |
77 | 77 | ||
78 | @each $size in (0 50 100) { | 78 | @each $size in (0 10 50 100 200) { |
79 | @include iro.bem-utility('p#{$dir}-#{$size}') { | 79 | @include iro.bem-utility('p#{$dir}-#{$size}') { |
80 | padding#{$suffix}: fn.global-dim(--size --#{$size}); | 80 | padding#{$suffix}: fn.global-dim(--size --#{$size}); |
81 | } | 81 | } |
diff --git a/src/layouts/_form.scss b/src/layouts/_form.scss index 8228c44..15dca2e 100644 --- a/src/layouts/_form.scss +++ b/src/layouts/_form.scss | |||
@@ -15,13 +15,17 @@ | |||
15 | @include iro.bem-layout(iro.props-namespace()) { | 15 | @include iro.bem-layout(iro.props-namespace()) { |
16 | display: flex; | 16 | display: flex; |
17 | flex-direction: column; | 17 | flex-direction: column; |
18 | align-items: baseline; | ||
19 | gap: fn.dim(--item-spacing-y) fn.dim(--label-spacing-x); | 18 | gap: fn.dim(--item-spacing-y) fn.dim(--label-spacing-x); |
20 | 19 | ||
20 | @include iro.bem-elem('item') { | ||
21 | display: block; | ||
22 | } | ||
23 | |||
21 | @include iro.bem-modifier('labels-left', 'labels-right') { | 24 | @include iro.bem-modifier('labels-left', 'labels-right') { |
22 | display: grid; | 25 | display: grid; |
23 | grid-template-columns: auto 1fr; | 26 | grid-template-columns: auto 1fr; |
24 | grid-template-rows: auto; | 27 | grid-template-rows: auto; |
28 | align-items: baseline; | ||
25 | 29 | ||
26 | @include iro.bem-elem('item') { | 30 | @include iro.bem-elem('item') { |
27 | display: contents; | 31 | display: contents; |
diff --git a/src/objects/_dialog.scss b/src/objects/_dialog.scss index b0b435f..ad6e7db 100644 --- a/src/objects/_dialog.scss +++ b/src/objects/_dialog.scss | |||
@@ -76,6 +76,7 @@ | |||
76 | grid-area: body; | 76 | grid-area: body; |
77 | min-height: 0; | 77 | min-height: 0; |
78 | margin-top: fn.dim(--title-body-spacing); | 78 | margin-top: fn.dim(--title-body-spacing); |
79 | overflow: auto; | ||
79 | } | 80 | } |
80 | 81 | ||
81 | @include iro.bem-elem('footer') { | 82 | @include iro.bem-elem('footer') { |
diff --git a/src/objects/_field-label.scss b/src/objects/_field-label.scss index e990568..4195e11 100644 --- a/src/objects/_field-label.scss +++ b/src/objects/_field-label.scss | |||
@@ -21,10 +21,11 @@ | |||
21 | ), 'colors'); | 21 | ), 'colors'); |
22 | 22 | ||
23 | @include iro.bem-object(iro.props-namespace()) { | 23 | @include iro.bem-object(iro.props-namespace()) { |
24 | display: inline-block; | 24 | display: block; |
25 | 25 | ||
26 | @include iro.bem-elem('label') { | 26 | @include iro.bem-elem('label') { |
27 | display: block; | 27 | display: block; |
28 | flex: 0 0 auto; | ||
28 | padding-right: fn.dim(--spacing-x); | 29 | padding-right: fn.dim(--spacing-x); |
29 | color: fn.color(--label); | 30 | color: fn.color(--label); |
30 | font-size: fn.dim(--label-font-size); | 31 | font-size: fn.dim(--label-font-size); |
@@ -37,7 +38,8 @@ | |||
37 | } | 38 | } |
38 | 39 | ||
39 | @include iro.bem-elem('content') { | 40 | @include iro.bem-elem('content') { |
40 | display: inline-block; | 41 | display: block; |
42 | width: 100%; | ||
41 | } | 43 | } |
42 | 44 | ||
43 | @include iro.bem-elem('hint') { | 45 | @include iro.bem-elem('hint') { |
@@ -60,7 +62,7 @@ | |||
60 | } | 62 | } |
61 | 63 | ||
62 | @include iro.bem-modifier('left', 'right') { | 64 | @include iro.bem-modifier('left', 'right') { |
63 | display: inline-flex; | 65 | display: flex; |
64 | align-items: baseline; | 66 | align-items: baseline; |
65 | 67 | ||
66 | @include iro.bem-elem('label') { | 68 | @include iro.bem-elem('label') { |
diff --git a/tpl/index.pug b/tpl/index.pug index 4926889..623a513 100644 --- a/tpl/index.pug +++ b/tpl/index.pug | |||
@@ -166,23 +166,18 @@ html | |||
166 | +field-label('First name') | 166 | +field-label('First name') |
167 | +text-field(placeholder='Placeholder') | 167 | +text-field(placeholder='Placeholder') |
168 | br | 168 | br |
169 | br | ||
170 | +field-label('Password', 'At least 6 characters required') | 169 | +field-label('Password', 'At least 6 characters required') |
171 | +text-field(placeholder='Placeholder' type='password') | 170 | +text-field(placeholder='Placeholder' type='password') |
172 | br | 171 | br |
173 | br | ||
174 | +field-label('Password', 'At least 6 characters required')(invalid=true) | 172 | +field-label('Password', 'At least 6 characters required')(invalid=true) |
175 | +text-field(placeholder='Placeholder' type='password' invalid=true) | 173 | +text-field(placeholder='Placeholder' type='password' invalid=true) |
176 | br | 174 | br |
177 | br | ||
178 | +field-label('First name')(disabled=true) | 175 | +field-label('First name')(disabled=true) |
179 | +text-field(placeholder='Placeholder' disabled=true) | 176 | +text-field(placeholder='Placeholder' disabled=true) |
180 | br | 177 | br |
181 | br | ||
182 | +field-label('Password', 'At least 6 characters required')(disabled=true) | 178 | +field-label('Password', 'At least 6 characters required')(disabled=true) |
183 | +text-field(placeholder='Placeholder' type='password' disabled=true) | 179 | +text-field(placeholder='Placeholder' type='password' disabled=true) |
184 | br | 180 | br |
185 | br | ||
186 | +field-label('Password', 'At least 6 characters required')(invalid=true disabled=true) | 181 | +field-label('Password', 'At least 6 characters required')(invalid=true disabled=true) |
187 | +text-field(placeholder='Placeholder' type='password' invalid=true disabled=true) | 182 | +text-field(placeholder='Placeholder' type='password' invalid=true disabled=true) |
188 | 183 | ||
@@ -190,23 +185,18 @@ html | |||
190 | +field-label('First name')(align='left' labelWidth='100px') | 185 | +field-label('First name')(align='left' labelWidth='100px') |
191 | +text-field(placeholder='Placeholder') | 186 | +text-field(placeholder='Placeholder') |
192 | br | 187 | br |
193 | br | ||
194 | +field-label('Password', 'At least 6 characters required')(align='left' labelWidth='100px') | 188 | +field-label('Password', 'At least 6 characters required')(align='left' labelWidth='100px') |
195 | +text-field(placeholder='Placeholder' type='password') | 189 | +text-field(placeholder='Placeholder' type='password') |
196 | br | 190 | br |
197 | br | ||
198 | +field-label('Password', 'At least 6 characters required')(align='left' labelWidth='100px' invalid=true) | 191 | +field-label('Password', 'At least 6 characters required')(align='left' labelWidth='100px' invalid=true) |
199 | +text-field(placeholder='Placeholder' type='password' invalid=true) | 192 | +text-field(placeholder='Placeholder' type='password' invalid=true) |
200 | br | 193 | br |
201 | br | ||
202 | +field-label('First name')(align='left' labelWidth='100px' disabled=true) | 194 | +field-label('First name')(align='left' labelWidth='100px' disabled=true) |
203 | +text-field(placeholder='Placeholder' disabled=true) | 195 | +text-field(placeholder='Placeholder' disabled=true) |
204 | br | 196 | br |
205 | br | ||
206 | +field-label('Password', 'At least 6 characters required')(align='left' labelWidth='100px' disabled=true) | 197 | +field-label('Password', 'At least 6 characters required')(align='left' labelWidth='100px' disabled=true) |
207 | +text-field(placeholder='Placeholder' type='password' disabled=true) | 198 | +text-field(placeholder='Placeholder' type='password' disabled=true) |
208 | br | 199 | br |
209 | br | ||
210 | +field-label('Password', 'At least 6 characters required')(align='left' labelWidth='100px' invalid=true disabled=true) | 200 | +field-label('Password', 'At least 6 characters required')(align='left' labelWidth='100px' invalid=true disabled=true) |
211 | +text-field(placeholder='Placeholder' type='password' invalid=true disabled=true) | 201 | +text-field(placeholder='Placeholder' type='password' invalid=true disabled=true) |
212 | 202 | ||
@@ -214,23 +204,18 @@ html | |||
214 | +field-label('First name')(align='right' labelWidth='100px') | 204 | +field-label('First name')(align='right' labelWidth='100px') |
215 | +text-field(placeholder='Placeholder') | 205 | +text-field(placeholder='Placeholder') |
216 | br | 206 | br |
217 | br | ||
218 | +field-label('Password', 'At least 6 characters required')(align='right' labelWidth='100px') | 207 | +field-label('Password', 'At least 6 characters required')(align='right' labelWidth='100px') |
219 | +text-field(placeholder='Placeholder' type='password') | 208 | +text-field(placeholder='Placeholder' type='password') |
220 | br | 209 | br |
221 | br | ||
222 | +field-label('Password', 'At least 6 characters required')(align='right' labelWidth='100px' invalid=true) | 210 | +field-label('Password', 'At least 6 characters required')(align='right' labelWidth='100px' invalid=true) |
223 | +text-field(placeholder='Placeholder' type='password' invalid=true) | 211 | +text-field(placeholder='Placeholder' type='password' invalid=true) |
224 | br | 212 | br |
225 | br | ||
226 | +field-label('First name')(align='right' labelWidth='100px' disabled=true) | 213 | +field-label('First name')(align='right' labelWidth='100px' disabled=true) |
227 | +text-field(placeholder='Placeholder' disabled=true) | 214 | +text-field(placeholder='Placeholder' disabled=true) |
228 | br | 215 | br |
229 | br | ||
230 | +field-label('Password', 'At least 6 characters required')(align='right' labelWidth='100px' disabled=true) | 216 | +field-label('Password', 'At least 6 characters required')(align='right' labelWidth='100px' disabled=true) |
231 | +text-field(placeholder='Placeholder' type='password' disabled=true) | 217 | +text-field(placeholder='Placeholder' type='password' disabled=true) |
232 | br | 218 | br |
233 | br | ||
234 | +field-label('Password', 'At least 6 characters required')(align='right' labelWidth='100px' invalid=true disabled=true) | 219 | +field-label('Password', 'At least 6 characters required')(align='right' labelWidth='100px' invalid=true disabled=true) |
235 | +text-field(placeholder='Placeholder' type='password' invalid=true disabled=true) | 220 | +text-field(placeholder='Placeholder' type='password' invalid=true disabled=true) |
236 | 221 | ||
@@ -473,7 +458,7 @@ html | |||
473 | +action-button(quiet=true selected=true)= 'Menu' | 458 | +action-button(quiet=true selected=true)= 'Menu' |
474 | +action-menu | 459 | +action-menu |
475 | +action-menu-slot(class='l-card l-card--flush') | 460 | +action-menu-slot(class='l-card l-card--flush') |
476 | +avatar(block=true circle=true size='75' src='avatar.png' class='l-card__block') | 461 | +avatar(block=true circle=true size='100' src='avatar.png' class='l-card__block') |
477 | .l-card__block.l-card__block--main | 462 | .l-card__block.l-card__block--main |
478 | strong.u-d-block= 'Volpeon' | 463 | strong.u-d-block= 'Volpeon' |
479 | small.u-d-block= '@volpeon@mk.vulpes.one' | 464 | small.u-d-block= '@volpeon@mk.vulpes.one' |