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

Allow spacing in typography variations #61214

Open
richtabor opened this issue Apr 29, 2024 · 5 comments
Open

Allow spacing in typography variations #61214

richtabor opened this issue Apr 29, 2024 · 5 comments
Labels
[Feature] Theme Style Variations Related to style variations provided by block themes Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json [Type] Enhancement A suggestion for improvement.

Comments

@richtabor
Copy link
Member

richtabor commented Apr 29, 2024

As a follow-up to #60220, I propose we allow for spacing to be allowed within typography variations.

This would allow typography variations to be much more refined, as the space between paragraphs (spacing.blockGap) may be modified by a typography variation, as well as adjustments for elements like buttons—which may need more padding with an accompanying larger font size.

Visual

Here's a visual of the current typography variations, which are filtered from theme style variations:

CleanShot 2024-04-29 at 15 16 56

@richtabor richtabor added [Type] Enhancement A suggestion for improvement. [Feature] Theme Style Variations Related to style variations provided by block themes Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json labels Apr 29, 2024
@richtabor richtabor changed the title Allow spacing in typography presets Allow spacing in typography variations Apr 29, 2024
@richtabor richtabor added [Type] Bug An existing feature does not function as intended and removed [Type] Enhancement A suggestion for improvement. labels May 31, 2024
@richtabor
Copy link
Member Author

Marking this as a bug, as blockGap cannot be expressed by typography variations to set the space between paragraphs.

@mtias
Copy link
Member

mtias commented Jun 24, 2024

I think we have to be careful to muddle typography presets with potentially unrelated spacing changes. The fundamental issue seems to be we need some better control over spacing between paragraphs that can also account for whether a heading is preceding. Also related to #37462

If these are typography specific settings they would be available in the typography key.

@mtias mtias added [Type] Enhancement A suggestion for improvement. and removed [Type] Bug An existing feature does not function as intended labels Jun 24, 2024
@ellatrix
Copy link
Member

This is an enhancement, so punting to WP 6.7.

@ellatrix ellatrix moved this from 📥 Todo to 🏈 Punted to 6.7 in WordPress 6.6 Editor Tasks Jun 25, 2024
@justintadlock
Copy link
Contributor

Just throwing this out there: I'd also argue that layout width, specifically settings.layout.contentWidth, is directly tied to typography. Outside of font-size this is the best way to adjust for characters per line.

@mtias
Copy link
Member

mtias commented Jul 25, 2024

It might be worth exploring expressing content width with ch units as well as a possible default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Theme Style Variations Related to style variations provided by block themes Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json [Type] Enhancement A suggestion for improvement.
Projects
No open projects
Status: 🏈 Punted to 6.7
Development

Successfully merging a pull request may close this issue.

4 participants