WordPress / gutenberg

The Block Editor project for WordPress and beyond. Plugin is available from the official repository.
https://wordpress.org/gutenberg/
Other
10.54k stars 4.21k forks source link

Style errors in selectControl prefix #59698

Open dabowman opened 8 months ago

dabowman commented 8 months ago

Description

The current state of the selectControl component allows for a prefix to be inserted. However, that prefix doesn't seem to respect the padding of the input as expected. The font size of the prefix also doesn't respond to screen size changes like the main input type style does.

Step-by-step reproduction instructions

You can see this in action in Storybook Add a value for prefix. See that there is no padding to the left (should be the same as what it was without a prefix). Also the spacing between the prefix and the text of the select should be 4px or .25rem.

You can then size the window down <600px to see the difference in font size between the prefix and the main slect text.

Screenshots, screen recording, code snippet

Screenshot 2024-03-07 at 3 31 06 PM Screenshot 2024-03-07 at 3 31 17 PM

This is the correct design from the WordPress Design Library Figma file:

Screenshot 2024-03-07 at 3 36 25 PM

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

dabowman commented 8 months ago

It looks like most of the styles, including the prefix styles are coming from the main input-control component. The