-
Notifications
You must be signed in to change notification settings - Fork 361
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
Blank Canvas Blocks: patch quote styles #3421
Blank Canvas Blocks: patch quote styles #3421
Conversation
@@ -0,0 +1,5 @@ | |||
.wp-block-quote { | |||
cite, .wp-block-quote__citation { | |||
font-size: var(--wp--preset--font-size--small); |
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.
Would you expect to be able to configure this? Could this be a large font in another theme? If so how would you expect to configure this once Gutenberg would allow for that?
There's no guarantee that a particular preset is going to be available in a child theme (since they can change those preset just like color). Maybe we should be leveraging only variables expressed in "custom".
Perhaps: font-size: var(--wp--custom--quote--citation--typography--font-size)
?
and that could map in theme.json:
custom: quote: citation: typography: font-size: var(--wp--preset--font-size--small),
Maybe that's deeper of an object that's needed...
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.
There's no guarantee that a particular preset is going to be available in a child theme (since they can change those preset just like color). Maybe we should be leveraging only variables expressed in "custom".
I see your point.
Would you expect to be able to configure this? Could this be a large font in another theme? If so how would you expect to configure this once Gutenberg would allow for that?
As a theme developer and user, I would want to be able to change the font-size of the citation in a quote. I also expect the front-end and view to match. So to clarify for our purposes — should that be done with CSS + custom theme.json variables in this theme?
(Aside: it seems to me the main difference with this approach compared to Seedlet is that I'm expressing the variables in the custom section of theme.json, rather than modular sass files.)
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.
(Aside the II: That's the main difference yea. There's some part in seedlet where the question to how to build the CSS was "how do we want it to work?" where the question here is rather "how do I expect to be able to configure that for Gutenberg and then take advantage of that configuration". I imagine the answer is often the same but likely not always.)
I think you're right. I expect that any CSS we add to this would be because it's something we're configuring in theme.json. Hopefully little would be added that isn't directly linked to a variable.
Font families will be taken care of by #3422. |
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. I expect some themes would want more customization than this can offer - for example big quote marks (like libre 2). I guess we should add these as they are needed though...
Part of #3413. This PR adds styles for the quote block.