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

Blank Canvas Blocks: patch quote styles #3421

Merged
merged 4 commits into from
Mar 9, 2021

Conversation

jffng
Copy link
Contributor

@jffng jffng commented Mar 8, 2021

Part of #3413. This PR adds styles for the quote block.

Before This PR
Screen Shot 2021-03-08 at 11 37 21 AM Screen Shot 2021-03-08 at 11 37 03 AM

@jffng jffng added this to the Blank Canvas Blocks milestone Mar 8, 2021
@jffng jffng requested a review from a team March 8, 2021 18:30
@@ -0,0 +1,5 @@
.wp-block-quote {
cite, .wp-block-quote__citation {
font-size: var(--wp--preset--font-size--small);
Copy link
Contributor

@pbking pbking Mar 8, 2021

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

Copy link
Contributor Author

@jffng jffng Mar 8, 2021

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

Copy link
Contributor

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.

@jffng
Copy link
Contributor Author

jffng commented Mar 8, 2021

Noting this is what the quote looks like in Blank Canvas:

Screen Shot 2021-03-08 at 11 12 47 AM

@jffng
Copy link
Contributor Author

jffng commented Mar 8, 2021

Font families will be taken care of by #3422.

Copy link
Member

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

@scruffian scruffian merged commit a959db8 into make/blank-canvas-blocks Mar 9, 2021
@scruffian scruffian deleted the add/bcb-quote-block-styles branch March 9, 2021 11:50
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