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

RangeControl styling sins #25345

Closed
stokesman opened this issue Sep 15, 2020 · 1 comment · Fixed by #26745
Closed

RangeControl styling sins #25345

stokesman opened this issue Sep 15, 2020 · 1 comment · Fixed by #26745
Labels
CSS Styling Related to editor and front end styles, CSS-specific issues. [Feature] UI Components Impacts or related to the UI component system Needs Design Feedback Needs general design feedback. [Package] Components /packages/components

Comments

@stokesman
Copy link
Contributor

RangeControl signals interactivity where there is none in two ways. First, its root element sports a cursor:pointer style yet not all of that area is interactive. Second, at each end of the range, half of its Thumb is outside the interactive area, making that half a trap because clicking on it will do nothing (except blur the input if it had focus).

Screen Capture
range-fails

To reproduce
Steps to reproduce the behavior:

  1. Using a cursor-having device, open your nearest Block Editor (maybe: https://wordpress.org/gutenberg/).
  2. Add a block with a RangeControl in its settings (Spacer, Columns, Gallery, etc.)
  3. Find the RangeControl in block settings
  4. Have a go at reproducing the cases previously described

Expected behavior
Any portion of the component that is not interactive should not signal interactivity.

Editor version (please complete the following information):

  • WordPress version: 5.5
  • Gutenberg: as shipped or with plugin (8.9.2)
@stokesman
Copy link
Contributor Author

Fixing this is easy enough but I think some feedback could help before making a PR. The route of least change is to widen the range input element by positioning it's left and right edges farther out from the center by half the width of the thumb. It doesn't affect the visual track area just expands the interactive area. However, I think it'd be an improvement to widen the track area and prevent the thumb from sticking out at all. It betters alignment and correspondence of visual track area to interactive area. Here are a couple of screenshots to illustrate:
range-style-fix-a
range-style-fix-a1

That is all in regards to the second part of the issue. No debate on the first part, just removal of the cursor:pointer style from the root element.

@talldan talldan added [Package] Components /packages/components CSS Styling Related to editor and front end styles, CSS-specific issues. labels Sep 16, 2020
@youknowriad youknowriad added [Feature] UI Components Impacts or related to the UI component system Needs Design Feedback Needs general design feedback. labels Sep 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CSS Styling Related to editor and front end styles, CSS-specific issues. [Feature] UI Components Impacts or related to the UI component system Needs Design Feedback Needs general design feedback. [Package] Components /packages/components
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants