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

Color Picker component causes horizontal scrollbars in Block Settings sidebar #29544

Closed
Tracked by #34284
begroff opened this issue Mar 4, 2021 · 2 comments
Closed
Tracked by #34284
Labels
CSS Styling Related to editor and front end styles, CSS-specific issues. [Feature] Block settings menu The block settings screen [Type] Bug An existing feature does not function as intended

Comments

@begroff
Copy link

begroff commented Mar 4, 2021

Description

The CSS for the color picker component is causing horizontal scrollbars in the block settings sidebar on desktop browser. I have a call to action custom block that is using the ColorPicker component inside of InspectorControls, inside of a PanelBody, inside of a PanelRow. I was developing this custom block using WordPress version 5.4 and when I updated to 5.6.2 it caused horizontal scrollbars to appear.

Step-by-step reproduction instructions

  1. Add the custom block JS so it is available in the editor (gist link in code snippet)
  2. Search for Call to Action and add the block
  3. Highlight the block to bring up inspector controls
  4. Look at the panel section called Overlay

Expected behaviour

No horizontal scrollbars should appear in the block settings sidebar

Actual behaviour

Horizontal scrollbars are appearing in the block settings sidebar

Screenshots or screen recording (optional)

block_editor_color_picker_issue

Code snippet (optional)

https://gist.github.com/begroff/9c66a539d70f43eb816931caabd1e175

WordPress information

  • WordPress version: 5.6.2
  • Gutenberg version: Not installed
  • Are all plugins except Gutenberg deactivated? N/A
  • Are you using a default theme (e.g. Twenty Twenty-One)? No

Device information

  • Device: Desktop
  • Operating system: Ubuntu 18.04
  • Browser: Chrome 88.0.4324.182 / Firefox 86.0
@begroff
Copy link
Author

begroff commented Mar 4, 2021

I mocked up a fix for this
image

.components-base-control__label { /* This is probably a catch all for the hexadecimal label but there wasn't a specific class on this element */
    width: 100%
}

.components-color-picker__inputs-wrapper {
    align-items: flex-start;
}

.components-color-picker__inputs-toggle-wrapper {
    margin: 26px 0 0 0;
    border: 1px solid #757575;
    border-radius: 2px;
    height: 30px;
}

@obulat obulat added [Feature] Block settings menu The block settings screen [Type] Bug An existing feature does not function as intended CSS Styling Related to editor and front end styles, CSS-specific issues. labels Mar 31, 2021
@ciampo ciampo mentioned this issue Aug 25, 2021
31 tasks
@jameskoster
Copy link
Contributor

I believe this should be fixed by #41646

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] Block settings menu The block settings screen [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

3 participants