Skip to content

Commit 4a3d34f

Browse files
committed
fix: unify container padding, margins, radius
1 parent 6b99daa commit 4a3d34f

File tree

7 files changed

+65
-67
lines changed

7 files changed

+65
-67
lines changed

blocks/cards/cards.css

+2-6
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
margin: 0;
44
padding: 0;
55
display: grid;
6-
grid-template-columns: repeat(auto-fill, minmax(278px, 1fr));
7-
grid-gap: 16px;
6+
grid-template-columns: repeat(auto-fill, minmax(257px, 1fr));
7+
grid-gap: 24px;
88
}
99

1010
.cards > ul > li {
@@ -20,10 +20,6 @@
2020
line-height: 0;
2121
}
2222

23-
.cards .cards-card-body > *:first-child {
24-
margin-top: 0;
25-
}
26-
2723
.cards > ul > li img {
2824
width: 100%;
2925
aspect-ratio: 4 / 3;

blocks/columns/columns.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
.columns > div {
2424
align-items: center;
2525
flex-direction: unset;
26-
gap: 32px;
26+
gap: 24px;
2727
}
2828

2929
.columns > div > div {

blocks/footer/footer.css

+9-3
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,20 @@
11
footer {
2-
padding: 2rem;
32
background-color: var(--light-color);
43
font-size: var(--body-font-size-s);
54
}
65

7-
footer .footer {
8-
max-width: 1200px;
6+
footer .footer > div {
97
margin: auto;
8+
max-width: 1200px;
9+
padding: 40px 24px 24px;
1010
}
1111

1212
footer .footer p {
1313
margin: 0;
1414
}
15+
16+
@media (width >= 900px) {
17+
footer .footer > div {
18+
padding: 40px 32px 24px;
19+
}
20+
}

blocks/fragment/fragment.css

+1-13
Original file line numberDiff line numberDiff line change
@@ -1,13 +1 @@
1-
/* suppress nested section padding */
2-
.fragment-wrapper > .section {
3-
padding-left: 0;
4-
padding-right: 0;
5-
}
6-
7-
.fragment-wrapper > .section:first-of-type {
8-
padding-top: 0;
9-
}
10-
11-
.fragment-wrapper > .section:last-of-type {
12-
padding-bottom: 0;
13-
}
1+
/* stylelint-disable no-empty-source */

blocks/header/header.css

+12-15
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ header nav {
1313
'hamburger brand tools' var(--nav-height)
1414
'sections sections sections' 1fr / auto 1fr auto;
1515
align-items: center;
16-
gap: 0 2em;
16+
gap: 0 24px;
1717
margin: auto;
18-
max-width: 1264px;
18+
max-width: 1248px;
1919
height: var(--nav-height);
20-
padding: 0 1rem;
20+
padding: 0 24px;
2121
font-family: var(--body-font-family);
2222
}
2323

@@ -27,19 +27,16 @@ header nav[aria-expanded='true'] {
2727
'sections sections' 1fr
2828
'tools tools' var(--nav-height) / auto 1fr;
2929
overflow-y: auto;
30-
min-height: 100vh;
31-
}
32-
33-
@media (width >= 600px) {
34-
header nav {
35-
padding: 0 2rem;
36-
}
30+
min-height: 100dvh;
3731
}
3832

3933
@media (width >= 900px) {
4034
header nav {
4135
display: flex;
4236
justify-content: space-between;
37+
gap: 0 32px;
38+
max-width: 1264px;
39+
padding: 0 32px;
4340
}
4441

4542
header nav[aria-expanded='true'] {
@@ -225,7 +222,7 @@ header nav .nav-sections ul > li > ul > li {
225222

226223
header nav .nav-sections ul {
227224
display: flex;
228-
gap: 2em;
225+
gap: 24px;
229226
margin: 0;
230227
font-size: var(--body-font-size-xs);
231228
}
@@ -244,10 +241,10 @@ header nav .nav-sections ul > li > ul > li {
244241
header nav .nav-sections .default-content-wrapper > ul > li[aria-expanded='true'] > ul {
245242
display: block;
246243
position: absolute;
247-
left: -1em;
244+
left: -24px;
248245
width: 200px;
249-
margin-top: 12px;
250-
padding: 1em;
246+
top: 150%;
247+
padding: 16px;
251248
background-color: var(--light-color);
252249
white-space: initial;
253250
}
@@ -256,7 +253,7 @@ header nav .nav-sections ul > li > ul > li {
256253
content: '';
257254
position: absolute;
258255
top: -8px;
259-
left: 8px;
256+
left: 16px;
260257
width: 0;
261258
height: 0;
262259
border-left: 8px solid transparent;

blocks/hero/hero.css

+8-5
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
1-
main .hero-container > div {
1+
.hero-container .hero-wrapper {
22
max-width: unset;
3-
}
4-
5-
main .hero-container {
63
padding: 0;
74
}
85

96
.hero {
107
position: relative;
11-
padding: 32px;
8+
padding: 40px 24px;
129
min-height: 300px;
1310
}
1411

@@ -32,3 +29,9 @@ main .hero-container {
3229
width: 100%;
3330
height: 100%;
3431
}
32+
33+
@media (width >= 900px) {
34+
.hero {
35+
padding: 40px 32px;
36+
}
37+
}

styles/styles.css

+32-24
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@
5959
}
6060

6161
body {
62-
font-size: var(--body-font-size-m);
6362
margin: 0;
63+
font-size: var(--body-font-size-m);
6464
font-family: var(--body-font-family);
6565
line-height: 1.6;
6666
color: var(--text-color);
@@ -82,12 +82,12 @@ h3,
8282
h4,
8383
h5,
8484
h6 {
85+
margin-top: 0.8em;
86+
margin-bottom: 0.25em;
8587
font-family: var(--heading-font-family);
8688
font-weight: 600;
8789
line-height: 1.25;
88-
margin-top: 1em;
89-
margin-bottom: 0.5em;
90-
scroll-margin: calc(var(--nav-height) + 1em);
90+
scroll-margin: 40px;
9191
}
9292

9393
h1 { font-size: var(--heading-font-size-xxl); }
@@ -103,27 +103,27 @@ ol,
103103
ul,
104104
pre,
105105
blockquote {
106-
margin-top: 1em;
107-
margin-bottom: 1em;
106+
margin-top: 0.8em;
107+
margin-bottom: 0.25em;
108108
}
109109

110110
code,
111111
pre {
112112
font-size: var(--body-font-size-s);
113113
}
114114

115-
code {
116-
padding: 0.125em;
115+
pre {
116+
overflow-y: auto;
117117
}
118118

119-
pre {
120-
overflow: scroll;
119+
main > div {
120+
margin: 40px 16px;
121121
}
122122

123123
main pre {
124124
background-color: var(--light-color);
125-
padding: 1em;
126-
border-radius: 0.25em;
125+
padding: 16px;
126+
border-radius: 8px;
127127
overflow-x: auto;
128128
white-space: pre;
129129
}
@@ -132,6 +132,7 @@ main pre {
132132
a:any-link {
133133
color: var(--link-color);
134134
text-decoration: none;
135+
word-break: break-word;
135136
}
136137

137138
a:hover {
@@ -142,23 +143,25 @@ a:hover {
142143
/* buttons */
143144
a.button:any-link,
144145
button {
146+
max-width: 100%;
145147
font-family: var(--body-font-family);
146148
display: inline-block;
147149
box-sizing: border-box;
148150
text-decoration: none;
149151
border: 2px solid transparent;
150-
padding: 5px 30px;
152+
padding: 0.5em 1.2em;
151153
text-align: center;
152154
font-style: normal;
153155
font-weight: 600;
156+
line-height: 1.25;
154157
cursor: pointer;
155158
color: var(--background-color);
156159
background-color: var(--link-color);
157-
margin: 16px 0;
160+
margin: 12px 0;
158161
white-space: nowrap;
159162
overflow: hidden;
160163
text-overflow: ellipsis;
161-
border-radius: 30px;
164+
border-radius: 2.4em;
162165
}
163166

164167
a.button:hover,
@@ -200,25 +203,30 @@ main img {
200203
}
201204

202205
/* sections */
203-
main .section {
204-
padding: 64px 16px;
206+
main > .section {
207+
margin: 40px 0;
205208
}
206209

207-
@media (width >= 600px) {
208-
main .section {
209-
padding: 64px 32px;
210-
}
210+
main > .section > div {
211+
max-width: 1200px;
212+
margin: auto;
213+
padding: 0 24px;
214+
}
215+
216+
main > .section:first-of-type {
217+
margin-top: 0;
211218
}
212219

213220
@media (width >= 900px) {
214-
.section > div {
215-
max-width: 1200px;
216-
margin: auto;
221+
main > .section > div {
222+
padding: 0 32px;
217223
}
218224
}
219225

220226
/* section metadata */
221227
main .section.light,
222228
main .section.highlight {
223229
background-color: var(--light-color);
230+
margin: 0;
231+
padding: 40px 0;
224232
}

0 commit comments

Comments
 (0)