Skip to content

Commit

Permalink
fix: c-feed-list must still support <time/>
Browse files Browse the repository at this point in the history
#427 Bug:
A `<time>` is used without a `<p>` by `c-feed-list` in User Updates plugin. This `<time>` was not styled. Discovered on dev server before deploy.

This commit:
- adds support for time NOT wrapped in `<p>`
  • Loading branch information
wesleyboar committed Feb 23, 2024
1 parent da819fd commit 8a12ee9
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@

/* Elements: Items */

/* NOTE: `p:has(time)` styles CMS markup, but templates use `time` sans `<p>` */

.c-feed-list > :is(div, article) {
flex-grow: 1; /* to shrink feed title */

Expand All @@ -64,6 +66,7 @@
.c-feed-list > :is(div, article):last-of-type {
border-bottom: var(--global-border-width--normal) solid var(--global-color-primary--xx-dark);
}
.c-feed-list > :is(div, article) > time,
.c-feed-list > :is(div, article) > p:has(time) { grid-area: time; }
.c-feed-list > :is(div, article) > :is(h1, h2, h3, h4, h5, h6) { grid-area: name; }
.c-feed-list > :is(div, article) > p:not(:has(time, a:only-child)) { grid-area: desc; }
Expand All @@ -75,6 +78,7 @@
}

/* TODO: Share styles between c-news and c-feed-list (`time:not(…)`) */
.c-feed-list > :is(div, article) > time:not(:is(h1, h2, h3, h4, h5, h6) *),
.c-feed-list > :is(div, article) > p:has(time):not(:is(h1, h2, h3, h4, h5, h6) *) {
color: var(--global-color-accent--secondary);
font-weight: var(--medium);
Expand Down

0 comments on commit 8a12ee9

Please sign in to comment.