-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add dropcap to categories pages #208
Conversation
Thanks @MaggieCabrera, this looks good! |
Tracked in #75 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#208 has a different approach to this that feels a bit more straightforward, but this one works for me too.
wporg-news-2021/source/wp-content/themes/wporg-news-2021/sass/page/_categories.scss
Lines 9 to 30 in 3c8e3b5
// Some categories include a decorative drop-cap-like character. | |
&:before { | |
display: block; | |
width: 350px; | |
color: var(--wp--preset--color--blue-1); | |
font-size: 380px; | |
font-family: var(--wp--custom--heading--typography--font-family); | |
text-align: center; | |
line-height: 1; | |
position: fixed; | |
top: 180px; | |
left: var(--wp--custom--alignment--edge-spacing); | |
z-index: -1; | |
pointer-events: none; | |
} | |
} | |
body.category-awards { | |
.site-content-container:before { | |
content: "A"; | |
} | |
} |
Whichever you prefer works for me, but I think we should make the change in this PR since that one is already doing way too much for a single PR.
Er, maybe not since those others would have different templates anyway. |
I think this is a better solution than having the letter in the CSS because of i18n. Right now everything that doesn't need the dropcap has a different template like you said. Any exceptions to the rule can also be added easily with an exception to the CSS. |
i18n is a good point 👍🏻 |
I'm not sure if this is tracked somewhere but I've seen there's a dropcap in the design of category pages, so I went ahead and implemented it: