Skip to content

Commit e24b937

Browse files
committed
More form styles
1 parent 1bae9d8 commit e24b937

File tree

7 files changed

+76
-4
lines changed

7 files changed

+76
-4
lines changed

dist/winter.css

Lines changed: 32 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/winter.css.map

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/styles/buttons.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ input[type="button"] {
1919
justify-content: center;
2020

2121
min-width: 8ch;
22-
min-height: 2.2rem;
22+
/* min-height: 2.2rem; */
2323
text-align: center;
2424
line-height: inherit;
2525
vertical-align: middle;

src/styles/content.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,10 @@ main {
9494
&.hide-title h1 {
9595
display: none;
9696
}
97+
98+
section {
99+
margin-block: var(--winter-block-spacing);
100+
}
97101
}
98102

99103
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

src/styles/forms.css

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,33 @@ textarea {
1414
/* Forms that appear within main should have some block spacing */
1515
main form {
1616
margin-block: var(--winter-block-spacing);
17+
18+
& section {
19+
margin-block: var(--winter-block-spacing);
20+
21+
& h2 {
22+
margin-block-end: var(--winter-spacing-l);
23+
}
24+
25+
& aside {
26+
margin-block: var(--winter-block-spacing);
27+
font-family: var(--winter-form-aside-font);
28+
font-size: var(--winter-form-aside-font-size);
29+
color: var(--winter-form-aside-fg);
30+
background: var(--winter-form-aside-bg);
31+
border-inline-start: 0.15rem solid var(--winter-form-aside-accent);
32+
padding: var(--winter-form-aside-padding);
33+
box-shadow: var(--winter-shadow-xs);
34+
35+
& p:first-child {
36+
margin-block-start: 0;
37+
}
38+
}
39+
40+
& .grid {
41+
--gap: 1.5rem;
42+
}
43+
}
1744
}
1845

1946
/* Elements that create a new "block" */

src/styles/layout.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ body {
2929
grid-gap: var(--gap);
3030
/* min() with 100% prevents overflow in extra narrow spaces */
3131
grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--min)), 1fr));
32+
align-items: start;
3233

3334
&.col-2 {
3435
grid-template-columns: 1fr 1fr;

src/styles/tokens.css

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,15 @@
330330
--winter-range-active-fg: var(--winter-purple-2);
331331
--winter-range-active-thumb-size: 1.4rem;
332332

333+
/* <aside> within form, styled similar to <blockquote> */
334+
--winter-form-aside-padding: var(--winter-spacing-xs)
335+
var(--winter-spacing-s);
336+
--winter-form-aside-font: var(--winter-font-serif);
337+
--winter-form-aside-font-size: var(--winter-font-size-s);
338+
--winter-form-aside-fg: var(--winter-not-quite-black);
339+
--winter-form-aside-bg: var(--color-white);
340+
--winter-form-aside-accent: var(--winter-purple-4);
341+
333342
/* Markdown extensions */
334343
/* .admonition */
335344
--winter-admonition-font: var(--winter-font-serif);

0 commit comments

Comments
 (0)