Skip to content
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

Merged
merged 2 commits into from
Jan 21, 2022
Merged

Add dropcap to categories pages #208

merged 2 commits into from
Jan 21, 2022

Conversation

MaggieCabrera
Copy link
Collaborator

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:

Screenshot 2022-01-20 at 11 40 34

Screenshot 2022-01-20 at 11 39 33

Screenshot 2022-01-20 at 11 39 26

@beafialho
Copy link
Collaborator

Thanks @MaggieCabrera, this looks good!

@iandunn
Copy link
Member

iandunn commented Jan 20, 2022

Tracked in #75

Copy link
Member

@iandunn iandunn left a 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.

// 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.

@iandunn
Copy link
Member

iandunn commented Jan 20, 2022

I do like that this approach is automated, but it may need to be restricted to certain categories.

Er, maybe not since those others would have different templates anyway.

@iandunn iandunn mentioned this pull request Jan 20, 2022
@MaggieCabrera
Copy link
Collaborator Author

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.

@iandunn
Copy link
Member

iandunn commented Jan 21, 2022

i18n is a good point 👍🏻

@iandunn iandunn merged commit d96995e into trunk Jan 21, 2022
@iandunn iandunn deleted the try-dropcap-categories branch January 21, 2022 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants