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

New Style Idea: "Meta" Paragraph #7

Open
mrwweb opened this issue Mar 22, 2021 · 3 comments
Open

New Style Idea: "Meta" Paragraph #7

mrwweb opened this issue Mar 22, 2021 · 3 comments

Comments

@mrwweb
Copy link
Owner

mrwweb commented Mar 22, 2021

Sometimes I want clients to be able to make small text but not have access to the Font Size option.
Sometimes I want a standardized way of making text, smaller, gray, and italic.

What if we added a styles that made fonts 85%, gray, and italic all in one go? I'm a little nervous about whether we could consistently write a style that correctly understood the base paragraph font size if the paragraph element itself is styles directly.

Thinking out loud and interested in feedback.

@rtvenge
Copy link
Collaborator

rtvenge commented Mar 23, 2021

@mrwweb would rem units work for this? You could make it font-size: .85rem; or something. That would be worth testing on a few different themes.

@mrwweb
Copy link
Owner Author

mrwweb commented Mar 23, 2021

@rtvenge I don't think so?

Many but not all themes still reset :root or html to make 1rem = 10px. In those cases, that would make our font 8.5px.

But the bigger thing I'm stuck on is that if a font size is explicitly set on a paragraph rather than it's container (I think the Block Editor actually does this), then setting the 85% font size overrides the font-size, rather than modifying the cascade's font size for paragraphs.

This would work:

.entry-content {
  font-size: 1.125rem;
}
p.is-style-meta {
  font-size: 85%;
}

¯_(ツ)_/¯:

.entry-content p {
  font-size: 1.125rem;
}
p.is-style-meta {
  font-size: 85%;
}

@rtvenge
Copy link
Collaborator

rtvenge commented Mar 23, 2021

@mrwweb would it be too much to only set the italic and have the theme developer style our class? I guess the goal of this is to stay away from required developer changes.

Maybe the better solution to this problem would be a Block Pattern. (paragraph, italic, font-size set to extra small).

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

No branches or pull requests

2 participants