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

V2 Theme.json spacingSizes not applied properly #62195

Closed
richtabor opened this issue May 31, 2024 · 2 comments
Closed

V2 Theme.json spacingSizes not applied properly #62195

richtabor opened this issue May 31, 2024 · 2 comments
Labels
Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json [Type] Bug An existing feature does not function as intended

Comments

@richtabor
Copy link
Member

Description

A follow-up to #61842 is needed to iron out a quirk. It seems if the spacingSizes has a slug that is not the default values, the control does not apply them properly (tested on a V2 theme.json implementation).

Step-by-step reproduction instructions

  1. Edit the Twenty Twenty Four theme.json spacingSizes slugs to use small, large, etc. Also change the name value for each to match.
  2. Add a new page.
  3. Add a spacer block.
  4. Open the Inspector.
  5. Set the spacer block to use the presets.
  6. Drag it to the right.
  7. See the spacing sizes applied out of order.
  8. See the spacing sizes name not rendering, only the default numbers.

Screenshots, screen recording, code snippet

CleanShot.2024-05-31.at.14.38.15.mp4

Environment info

Trunk

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

@richtabor richtabor added [Type] Bug An existing feature does not function as intended Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json labels May 31, 2024
@richtabor
Copy link
Member Author

				{
					"name": "1",
					"size": "1rem",
					"slug": "x-small"
				},
				{
					"name": "2",
					"size": "min(1.5rem, 2vw)",
					"slug": "small"
				},
				{
					"name": "3",
					"size": "min(2.5rem, 3vw)",
					"slug": "medium"
				},
				{
					"name": "4",
					"size": "min(4rem, 5vw)",
					"slug": "large"
				},
				{
					"name": "5",
					"size": "min(6.5rem, 8vw)",
					"slug": "x-large"
				},
				{
					"name": "6",
					"size": "min(10.5rem, 13vw)",
					"slug": "xx-large"
				}

@ajlende
Copy link
Contributor

ajlende commented May 31, 2024

Duplicate of #62194

@ajlende ajlende marked this as a duplicate of #62194 May 31, 2024
@ajlende ajlende closed this as completed May 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json [Type] Bug An existing feature does not function as intended
Projects
No open projects
Status: Done
Development

No branches or pull requests

2 participants