66 --line : 1px solid;
77 --container : 1280px ;
88}
9- /* ====== Base Elements ======
10- General rules for basic HTML elements in any context */
9+ /* ====== Base Elements ====== */
1110body {
1211 background : var (--paper );
1312 color : var (--ink );
2322 width : 100% ;
2423 object-fit : cover;
2524}
26- /* ====== Site Layout ======
27- Setting the overall rules for page regions
28- https://www.w3.org/WAI/tutorials/page-structure/regions/
29- */
25+ /* ====== Site Layout ====== */
3026main {
3127 max-width : var (--container );
3228 margin : 0 auto calc (var (--space ) * 4 ) auto;
@@ -40,13 +36,7 @@ footer {
4036 border-top : 1px solid black;
4137 z-index : 9999 ;
4238}
43- /* ====== Articles Grid Layout ====
44- Setting the rules for how articles are placed in the main element.
45- Inspect this in Devtools and click the "grid" button in the Elements view
46- Play with the options that come up.
47- https://developer.chrome.com/docs/devtools/css/grid
48- https://gridbyexample.com/learn/
49- */
39+ /* ====== Articles Grid Layout ==== */
5040main {
5141 display : grid;
5242 grid-template-columns : 1fr 1fr ;
@@ -55,17 +45,14 @@ main {
5545 grid-column : span 2 ;
5646 }
5747}
58- /* ====== Article Layout ======
59- Setting the rules for how elements are placed in the article.
60- Now laying out just the INSIDE of the repeated card/article design.
61- Keeping things orderly and separate is the key to good, simple CSS.
62- */
48+ /* ====== Article Layout ====== */
6349article {
6450 border : var (--line );
6551 padding-bottom : var (--space );
6652 text-align : left;
6753 display : grid;
6854 grid-template-columns : var (--space ) 1fr var (--space );
55+ row-gap : 0.5rem ;
6956}
7057
7158article > * {
@@ -76,7 +63,10 @@ article > img {
7663 grid-column : span 3 ;
7764}
7865
79- article h2 ,
80- article p {
66+ article h2 {
8167 margin : 0 ;
8268}
69+
70+ article p {
71+ margin : 0.5rem 0 0 0 ;
72+ }
0 commit comments