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

Inability to distinguish between default and none margin/padding values #68069

Open
3 of 6 tasks
luisherranz opened this issue Dec 17, 2024 · 1 comment
Open
3 of 6 tasks
Labels
[Feature] Layout Layout block support, its UI controls, and style output. [Type] Bug An existing feature does not function as intended

Comments

@luisherranz
Copy link
Member

Description

In the Editor, it is not possible to visually differentiate between a margin or padding value that is set to the default and one that is explicitly set to "none" (0). Additionally, the UI does not clearly indicate that clicking the blue circle next to a margin/padding value will set it to "none." This lack of clarity can lead to confusion and make it difficult to manage spacing effectively.

Step-by-step reproduction instructions

  1. Select a block that has margin or padding settings (e.g., Group, Columns).
  2. Observe the margin/padding values in the Dimensions panel.
  3. Note that there is no visual distinction between a default value and a value explicitly set to "none."
  4. Click the blue circle next to a margin/padding value.
  5. Observe that the value is reset to "none," but there was no prior indication that this would happen.

Screenshots, screen recording, code snippet

Image Image

Environment info

No response

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

Please confirm which theme type you used for testing.

  • Block
  • Classic
  • Hybrid (e.g. classic with theme.json)
  • Not sure
@luisherranz luisherranz 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 [Feature] Layout Layout block support, its UI controls, and style output. and removed Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json labels Dec 17, 2024
@ramonjd
Copy link
Member

ramonjd commented Dec 18, 2024

Thanks for the issue.

This represents a smaller part of a wider issue:

Since #65071, global styles changed from being only able to be read by admins, to any users that can edit posts. Which is a long way of saying that global styles are now available in the post editor context.

This means that "default" values, by which I think you mean values inherited from the theme or global styles, can be referenced and even set in the control.

An example of this working is the background image control. Other controls, such as spacing, haven't had the same treatment.

It think it needs some UX and design thoughts, but the low-fi approach would be to set the control values with the default if any are found. Easy to say that 😄 but it might work for things like spacing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Layout Layout block support, its UI controls, and style output. [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

2 participants