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

Spacing Units: Tweak step values #37620

Open
stacimc opened this issue Dec 23, 2021 · 1 comment
Open

Spacing Units: Tweak step values #37620

stacimc opened this issue Dec 23, 2021 · 1 comment
Labels
[Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi [Type] Enhancement A suggestion for improvement.

Comments

@stacimc
Copy link
Contributor

stacimc commented Dec 23, 2021

Description

In #36186 it was noticed that some of the spacing units, in particular em and rem, are configured with a very small step value. This means that when you hold the 'up' or 'down' key to change spacing, em moves very slowly compared to px for example.

Here's a visual using the height of the Spacer block:

px-vs-em-step.mov

It's perhaps more noticeable on mobile, because the UnitControl has its own increment/decrement buttons:
Screen Shot 2021-12-23 at 10 38 31 AM

The step value comes from the configuration here and was introduced in #32692.

Step-by-step reproduction instructions

  1. In the block editor, insert a block that supports some spacing value. Cover is a good example, with its minHeight attribute.
  2. Adjust the value of the minHeight in the Inspector Controls, by clicking into the input and holding the up or down arrow key. On mobile use the up/down buttons.
  3. Try this with several different units, and notice that the em and rem increment is noticeably smaller/slower.

Screenshots, screen recording, code snippet

No response

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

@stacimc stacimc added the [Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi label Dec 23, 2021
@stacimc
Copy link
Contributor Author

stacimc commented Dec 23, 2021

For a conflicting perspective, quoting @aaronrobertshaw on #36186

Another perspective to consider is that most using the step functionality will be doing so to fine-tune a value rather than set it for these units. The small step value makes more sense in this case.

@jordesign jordesign added the [Type] Enhancement A suggestion for improvement. label Aug 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

2 participants