@@ -76,6 +76,11 @@ main {
7676 padding : calc (var (--space ) * 2 );
7777}
7878
79+ /* Center the PAGE TITLE and the SUBTITLE (matches wireframe + reviewer feedback) */
80+ .page-header {
81+ text-align : center;
82+ }
83+
7984main {
8085 /* Prevent overlap with fixed footer and give the layout breathing room */
8186 padding-bottom : calc (var (--footer-height ) + (var (--space ) * 2 ));
@@ -106,14 +111,14 @@ Play with the options that come up.
106111https://developer.chrome.com/docs/devtools/css/grid
107112https://gridbyexample.com/learn/
108113*/
109- main {
114+ . articles {
110115 display : grid;
111116 grid-template-columns : 1fr 1fr ;
112117 gap : calc (var (--space ) * 2 );
113118}
114119
115120/* Make the first article span both columns (wireframe layout) */
116- main > * : first-child {
121+ . articles > * : first-child {
117122 grid-column : 1 / -1 ;
118123}
119124
@@ -122,6 +127,7 @@ Setting the rules for how elements are placed in the article.
122127Now laying out just the INSIDE of the repeated card/article design.
123128Keeping things orderly and separate is the key to good, simple CSS.
124129*/
130+ .article ,
125131article {
126132 border : var (--line );
127133 padding-bottom : var (--space );
@@ -130,29 +136,34 @@ article {
130136 grid-template-columns : var (--space ) 1fr var (--space );
131137}
132138
139+ .article > * ,
133140article > * {
134141 grid-column : 2 / 3 ;
135142}
136143
144+ .article > img ,
137145article > img {
138146 grid-column : 1 / -1 ;
139147}
140148
141149/* Optional: improve spacing/readability while keeping the wireframe feel */
150+ .article h2 ,
142151article h2 {
143152 margin : calc (var (--space ) * 1.5 ) 0 var (--space );
144153}
145154
155+ .article p ,
146156article p {
147157 margin : 0 0 calc (var (--space ) * 1.5 );
148158}
149159
160+ /* Keep layout readable on small screens */
150161@media (max-width : 700px ) {
151- main {
162+ . articles {
152163 grid-template-columns : 1fr ;
153164 }
154165
155- main > * : first-child {
166+ . articles > * : first-child {
156167 grid-column : auto;
157168 }
158169}
0 commit comments