|
4 | 4 | */ |
5 | 5 |
|
6 | 6 | :root { |
7 | | - --padding-inline: 1rem; |
8 | | - --paragraph-max-width: 864px; |
9 | | - --content-max-width: 1400px; |
| 7 | + --padding-inline: 1rem; |
| 8 | + --paragraph-max-width: 864px; |
| 9 | + --content-max-width: 1400px; |
10 | 10 |
|
11 | | - --content-size: calc( |
12 | | - (var(--content-max-width) - var(--paragraph-max-width)) |
13 | | - ); |
| 11 | + --content-size: calc((var(--content-max-width) - var(--paragraph-max-width))); |
14 | 12 | } |
15 | 13 |
|
16 | 14 | .content-grid { |
17 | | - display: grid; |
18 | | - grid-template-columns: |
| 15 | + display: grid; |
| 16 | + overflow: hidden; |
| 17 | + text-wrap: balance; |
| 18 | + grid-template-columns: |
19 | 19 | [full-width-start] minmax(var(--padding-inline), 16rem) |
20 | 20 | [breakout-start] 0 |
21 | 21 | [content-start] 0 |
22 | 22 | [paragraph-start] |
23 | | - min( |
24 | | - 100% - (var(--padding-inline) * 2), |
25 | | - var(--paragraph-max-width) |
26 | | - ) |
| 23 | + min(100% - (var(--padding-inline) * 2), var(--paragraph-max-width)) |
27 | 24 | [paragraph-end] |
28 | | - minmax(0, var(--content-size))[content-end] |
| 25 | + minmax(0, var(--content-size)) [content-end] |
29 | 26 | minmax(0, 7rem) [breakout-end] |
30 | 27 | minmax(var(--padding-inline), 1fr) [full-width-end]; |
31 | 28 | } |
32 | 29 |
|
33 | 30 | .content-grid > *, |
34 | 31 | .full-width > *, |
35 | 32 | article.content-grid section > * { |
36 | | - grid-column: content; |
| 33 | + grid-column: content; |
37 | 34 | } |
38 | 35 |
|
39 | 36 | .content-grid > .paragraph, |
40 | 37 | .full-width > .paragraph, |
41 | 38 | article.content-grid section:not(.two-columns) > .paragraph { |
42 | | - grid-column: paragraph; |
| 39 | + grid-column: paragraph; |
43 | 40 | } |
44 | 41 |
|
45 | 42 | .content-grid > .breakout, |
46 | 43 | .full-width > .breakout, |
47 | 44 | article.content-grid section:not(.two-columns) > .breakout { |
48 | | - grid-column: breakout; |
| 45 | + grid-column: breakout; |
49 | 46 | } |
50 | 47 |
|
51 | 48 | .content-grid > .full-width, |
52 | 49 | article.content-grid section:not(.two-columns) { |
53 | | - grid-column: full-width; |
| 50 | + grid-column: full-width; |
54 | 51 |
|
55 | | - display: grid; |
56 | | - grid-template-columns: inherit; |
| 52 | + display: grid; |
| 53 | + grid-template-columns: inherit; |
57 | 54 | } |
58 | 55 |
|
59 | 56 | /* |
60 | 57 | * List of article elements that must be paragraph width |
61 | 58 | */ |
62 | 59 | article.content-grid p, |
63 | 60 | article.content-grid ul { |
64 | | - grid-column: paragraph; |
| 61 | + grid-column: paragraph; |
65 | 62 | } |
66 | 63 |
|
67 | 64 | /* |
68 | 65 | * List of article elements that must be breakout width |
69 | 66 | */ |
70 | 67 | article.content-grid pre { |
71 | | - grid-column: breakout; |
| 68 | + grid-column: breakout; |
72 | 69 | } |
73 | 70 |
|
74 | 71 | .two-columns { |
75 | | - grid-column: content; |
76 | | - display: grid; |
77 | | - grid-template-columns: 1fr 1fr; |
78 | | - gap: 2rem; |
| 72 | + grid-column: content; |
| 73 | + display: grid; |
| 74 | + grid-template-columns: 1fr 1fr; |
| 75 | + gap: 2rem; |
79 | 76 | } |
80 | 77 |
|
81 | 78 | .two-columns__paragraph { |
82 | | - grid-template-columns: minmax(auto, var(--paragraph-max-width)) 1fr; |
| 79 | + grid-template-columns: minmax(auto, var(--paragraph-max-width)) 1fr; |
83 | 80 | } |
84 | 81 |
|
85 | 82 | .two-columns > *, |
86 | 83 | article.content-grid section.two-columns > * { |
87 | | - grid-column: auto; |
| 84 | + grid-column: auto; |
88 | 85 | } |
89 | 86 |
|
90 | 87 | @media (max-width: 864px) { |
91 | | - .two-columns { |
92 | | - grid-template-columns: 1fr; |
93 | | - gap: 0; |
94 | | - } |
| 88 | + .two-columns { |
| 89 | + grid-template-columns: 1fr; |
| 90 | + gap: 0; |
| 91 | + } |
95 | 92 | } |
0 commit comments