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

[Quote, Pullquote Blocks] Allow theme.json customizations of the citation fields #35735

Closed
kjellr opened this issue Oct 18, 2021 · 5 comments
Closed
Assignees
Labels
[Block] Pullquote Affects the Pullquote Block [Block] Quote Affects the Quote Block [Feature] Themes Questions or issues with incorporating or styling blocks in a theme. Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json [Type] Enhancement A suggestion for improvement.

Comments

@kjellr
Copy link
Contributor

kjellr commented Oct 18, 2021

Currently, theme.json does not let you style the citation field for the Quote and Pullquote blocks.

It should be possible to (for example), set a font size for the main quote, and set a specific font size for the citation as well. Or to use different fonts for each. Here's some pseudocode for example:

"core/pullquote": {
	"typography": {
		"fontFamily": "var(--wp--preset--font-family--source-serif-pro)",
		"fontSize": "var(--wp--preset--font-size--huge)",
		"fontWeight": "300"
	},
	"citation": {
		"typography": {
			"fontFamily": "var(--wp--preset--font-family--system)",
			"fontSize": "var(--wp--preset--font-size--small)",
			"fontStyle": "italic"
		}
	}
}

Here's an example of what we'd like to achieve for the pullquote block in Twenty Twenty-Two, but cannot at the moment:

Screen Shot 2021-10-18 at 10 57 03 AM

The main issue in that specific case is that I cannot use one font for the quote, and another font for the citation.

@kjellr kjellr added [Type] Enhancement A suggestion for improvement. [Block] Quote Affects the Quote Block [Block] Pullquote Affects the Pullquote Block [Feature] Themes Questions or issues with incorporating or styling blocks in a theme. labels Oct 18, 2021
@ZebulanStanphill
Copy link
Member

It's worth noting that there have been plans to convert the Quote (and presumably also the Pullquote) to use nested blocks (#15486), and one of the things that would likely change alongside that is the markup of the blocks, in order to match the latest WHATWG spec. See https://github.com/WordPress/gutenberg/pull/25892/files#r589615279. Not sure if that has any effect on this issue, but I figured I'd bring it up in case it did,

@carolinan
Copy link
Contributor

carolinan commented Jun 29, 2022

@scruffian 👋 Do you think citation / cite should be added to elements?

@mtias mtias added the Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json label Jul 27, 2022
@scruffian
Copy link
Contributor

Yes I do. Would you like to create a PR for it? :)

@carolinan
Copy link
Contributor

Yes I can try, there should be enough reference in the other elements changes.

@scruffian
Copy link
Contributor

This was closed by #43543

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Pullquote Affects the Pullquote Block [Block] Quote Affects the Quote Block [Feature] Themes Questions or issues with incorporating or styling blocks in a theme. Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

5 participants