@@ -24,33 +24,28 @@ As well as useful links to learn more */
2424 --line : 1px solid;
2525 --container : 1280px ;
2626}
27+
2728/* ====== Base Elements ======
2829 General rules for basic HTML elements in any context */
2930
30-
31-
3231body {
3332 background : var (--paper );
3433 color : var (--ink );
3534 font : var (--font );
3635 margin : 0 ;
3736 padding-bottom : 100px ;
38-
3937}
4038
41-
42-
4339header {
4440 max-width : var (--container );
45- margin : var (--space )auto;
41+ margin : var (--space ) auto;
4642 padding : var (--space );
47- text-align : centre ;
43+ text-align : center ;
4844 border-bottom : var (--line );
4945}
5046
5147header h1 {
5248 margin : 0 ;
53-
5449 text-align : center;
5550}
5651
@@ -62,13 +57,13 @@ header p {
6257.btn {
6358 display : inline-block;
6459 padding : 8px 14px ;
65- border : 2px solid var (--link );
60+ border : 2px solid var (--ink );
6661 border-radius : 8px ;
6762 background : # f7f7f7 ;
6863 color : var (--ink );
6964 font-weight : 700 ;
7065 text-decoration : none;
71-
66+ transition : all 0.2 s ease;
7267}
7368
7469.btn : focus ,
@@ -80,27 +75,29 @@ header p {
8075}
8176
8277.btn : active {
83- transform : translateY (0 ); box-shadow : none ;
84- transition : all 0.2 s ease;
78+ transform : translateY (0 );
79+ box-shadow : none;
8580}
8681
87-
8882img ,
8983svg {
9084 width : 100% ;
9185 object-fit : cover;
9286}
87+
9388/* ====== Site Layout ======
9489Setting the overall rules for page regions
9590https://www.w3.org/WAI/tutorials/page-structure/regions/
9691*/
92+
9793main {
9894 max-width : var (--container );
9995 margin : 0 auto calc (var (--space ) * 4 ) auto;
10096 display : grid;
10197 grid-template-columns : 1fr 1fr ;
10298 gap : var (--space );
10399}
100+
104101footer {
105102 text-align : center;
106103 inset-inline : 0 ;
@@ -111,36 +108,39 @@ footer {
111108 width : 100% ;
112109 box-sizing : border-box;
113110}
111+
114112/* ====== Articles Grid Layout ====
115113Setting the rules for how articles are placed in the main element.
116114Inspect this in Devtools and click the "grid" button in the Elements view
117115Play with the options that come up.
118116https://developer.chrome.com/docs/devtools/css/grid
119117https://gridbyexample.com/learn/
120118*/
121- main > article : first-child {
119+
120+ main > article : first-child {
122121 grid-column : span 2 ;
123- }
122+ }
124123
125124/* ====== Article Layout ======
126125Setting the rules for how elements are placed in the article.
127126Now laying out just the INSIDE of the repeated card/article design.
128127Keeping things orderly and separate is the key to good, simple CSS.
129128*/
129+
130130article {
131131 border : var (--line );
132132 padding : var (--space );
133133 text-align : left;
134134 display : grid;
135135 grid-template-columns : 1fr ;
136136 gap : var (--space );
137- }
137+ }
138138
139- article img {
140- grid-column : 1 / -1 ;
141- margin : calc (var (--space ) * -1 ) calc (var (--space ) * -1 ) 0 calc (var (--space ) * -1 );
142- }
139+ article img {
140+ grid-column : 1 / -1 ;
141+ margin : calc (var (--space ) * -1 ) calc (var (--space ) * -1 ) 0 calc (var (--space ) * -1 );
142+ }
143143
144- article .btn {
144+ article .btn {
145145 width : fit-content;
146- }
146+ }
0 commit comments