-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Post Comments Form: ensure typography styles are applied to child elements #36425
Conversation
…s from typography inline styles on the block's container
Size Change: +547 B (0%) Total Size: 1.09 MB
ℹ️ View Unchanged
|
Thanks for following up on this one @ramonjd! I like the approach. Unfortunately, I ran out of time to test this, so will follow-up on Monday 😀 |
Moved comment down to the code block it describes
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.
This looks good to me @ramonjd, thanks for following up on the issue!
✅ This change allows each of the Typography styles to affect the heading within the comments form
✅ Setting a Typography setting to its default
value restores the styling defined in the theme (e.g. the heading font size)
✅ It's now possible to set some consistent simple styling across the rendered form, e.g.
As you mention, longer-term, it would be good to explore creating a core block (or blocks) to replace the generated comments form, and allow granular control over the headings, button, and link styles, but this PR adds in a good bit of consistency in the shorter-term. LGTM 👍
Thanks for reviewing @andrewserong ! I won't take credit: it was your idea. 🙇 |
…ments (#36425) * New CSS declarations to ensure that the post comments heading inherits from typography inline styles on the block's container * Font size can also be determined by a CSS class * Update style.scss Moved comment down to the code block it describes
Description
This patch introduces some wildcard CSS selectors to ensure that the post comments heading inherits from typography inline styles on the block's container.
Resolves #36188
A more long-term approach might be to create a core block to replace the comments form.
How has this been tested?
Using TT1/TwentyTwenty[One|Two], insert a Post Comments Form Block and play around with the typography controls for that block.
Publish the post and ensure that all the typography styles overwrite the theme's defaults.
Types of changes
Adding CSS declarations
Checklist:
*.native.js
files for terms that need renaming or removal).