Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions assets/css/v2/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -1202,6 +1202,7 @@ h6:has(a):hover {
/* Landing page cards */
.text-content .card-layout {
grid-column: 1;
margin-top: 1rem;

.card-section {
display: flex;
Expand Down Expand Up @@ -1248,6 +1249,24 @@ h6:has(a):hover {
&:not(:has(.featured-card)) *:nth-child(n + 3 of div.card-container) {
grid-column: 1 / -1;
}

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I almost have a PR up for the content regrid with gird utilities. That would mean the cards themselves could be passed a param and decide how to be displayed. Can these changes hold off till then?
These selectors are amazing though 😂 .

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, it can wait. The existing change is non-breaking so this can wait.

&:not(:has(.featured-card))
*:nth-child(n + 3 of div.card-container):has(
~ *:nth-child(n + 4 of div.card-container)
) {
grid-column: auto;
}

&:not(:has(.featured-card)) *:nth-child(n + 4 of div.card-container) {
grid-column: auto;
}

&:not(:has(.featured-card))
*:nth-last-child(1 of div.card-container):nth-child(
odd of div.card-container
) {
grid-column: 1 / -1;
}
}

.card-container {
Expand Down Expand Up @@ -1279,6 +1298,7 @@ h6:has(a):hover {
gap: 1.5rem;
align-items: center;
justify-content: start;
margin-bottom: 1rem;

img {
width: auto;
Expand Down
Loading