@@ -29,6 +29,9 @@ xxl: 1920px
2929 --loading-animation : 2s infinite ease-in-out;
3030
3131 position : relative;
32+ /* flex column so .card_byline can pin itself to the bottom */
33+ display : flex;
34+ flex-direction : column;
3235 padding : var (--card-spacing );
3336 color : var (--card-color );
3437 border-radius : var (--card-border-radius );
@@ -55,7 +58,12 @@ xxl: 1920px
5558 box-shadow : var (--card-shadow-hover );
5659}
5760
58- .card_link {
61+ /* The card's single link, stretched over the whole card. Put .card_link on a
62+ real anchor (usually the title link) so its text names the link. Positioned
63+ parts later in the DOM (.card_actions) paint above the ::after and stay
64+ clickable; parts before it need a z-index bump (.card_tags). */
65+ .card_link ::after {
66+ content : "" ;
5967 position : absolute;
6068 inset : 0 ;
6169}
@@ -71,12 +79,23 @@ xxl: 1920px
7179 .card_header : has ( + .card_media ) {
7280 margin-bottom : var (--card-spacing );
7381 }
74- .card_header_text h2 {
75- font-size : var (--text-lg );
76- font-weight : var (--semi-bold );
77- margin-bottom : 0 ;
82+
83+ .card_title {
84+ margin-bottom : 0 ;
85+ font-size : var (--text-lg );
86+ font-weight : var (--semi-bold );
87+ }
88+
89+ .card_title a {
90+ color : var (--card-color );
91+ -webkit-text-decoration : none;
92+ text-decoration : none;
93+ transition : color var (--transition );
7894 }
7995
96+ : is (.card_title a ): hover {
97+ color : var (--link-color );
98+ }
8099 .card_header_text p {
81100 font-size : var (--text-lg );
82101 color : var (--card-secondary-text-color );
@@ -93,12 +112,26 @@ xxl: 1920px
93112/* Badge visuals come from the .badge atom (atom.badge.css); the Card
94113 component renders class="badge card_badge" on each badge. */
95114
115+ .card_tags {
116+ /* keep the tags clickable above the stretched .card_link */
117+ position : relative;
118+ z-index : var (--z-1 );
119+ margin-bottom : var (--sm2 );
120+ }
121+
96122.card_media {
97123 margin-bottom : var (--card-spacing );
98124 overflow : hidden;
99125 border-radius : var (--card-border-radius );
100126}
101127
128+ .card_media-flush {
129+ /* edge-to-edge image on top of the card */
130+ margin : calc (var (--card-spacing ) * -1 );
131+ margin-bottom : var (--card-spacing );
132+ border-radius : var (--card-border-radius ) var (--card-border-radius ) 0 0 ;
133+ }
134+
102135.card_image {
103136 width : 100% ;
104137 object-fit : cover;
@@ -109,10 +142,35 @@ xxl: 1920px
109142 margin-bottom : 0 ;
110143 }
111144
145+ /* guaranteed gap before the byline even when nothing pins it down */
146+ .card_content : has ( + .card_byline ) {
147+ margin-bottom : var (--sm1 );
148+ }
149+
150+ .card_byline {
151+ /* margin-top: auto pins bylines to the bottom, so a row of cards lines up */
152+ display : flex;
153+ align-items : center;
154+ gap : var (--xs2 );
155+ margin-top : auto;
156+ font-size : var (--text-sm );
157+ }
158+
159+ .card_byline time {
160+ color : var (--card-secondary-text-color );
161+ }
162+
163+ .card_author {
164+ display : block;
165+ font-weight : var (--semi-bold );
166+ }
167+
112168.card_actions {
113169 display : flex;
114170 justify-content : flex-end;
115171 gap : var (--xs3 );
172+ /* positioned and after .card_link in the DOM, so actions paint above the
173+ stretched link and stay clickable */
116174 position : relative;
117175 margin-top : var (--card-spacing );
118176}
0 commit comments