Skip to content

Commit

Permalink
ColorPicker: fix layout overflow (#42992)
Browse files Browse the repository at this point in the history
* ColorPicker: fix layout overflow

* Move box=sizing reset to ColorfulWrapper component

* CHANGELOG
  • Loading branch information
ciampo committed Aug 9, 2022
1 parent 49e57d4 commit a7f569c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/components/CHANGELOG.md
Expand Up @@ -12,6 +12,7 @@
- `TextControl`, `TextareaControl`, `ToggleGroupControl`: Add `box-sizing` reset style ([#42889](https://github.com/WordPress/gutenberg/pull/42889)).
- `Popover`: fix arrow placement and design ([#42874](https://github.com/WordPress/gutenberg/pull/42874/)).
- `Popover`: fix minor glitch in arrow [#42903](https://github.com/WordPress/gutenberg/pull/42903)).
- `ColorPicker`: fix layout overflow [#42992](https://github.com/WordPress/gutenberg/pull/42992)).
- `ToolsPanel`: Constrain grid columns to 50% max-width ([#42795](https://github.com/WordPress/gutenberg/pull/42795)).
- `Popover`: anchor correctly to parent node when no explicit anchor is passed ([#42971](https://github.com/WordPress/gutenberg/pull/42971)).

Expand Down
3 changes: 3 additions & 0 deletions packages/components/src/color-picker/styles.ts
Expand Up @@ -11,6 +11,7 @@ import InnerSelectControl from '../select-control';
import InnerRangeControl from '../range-control';
import { StyledField } from '../base-control/styles/base-control-styles';
import { space } from '../ui/utils/space';
import { boxSizingReset } from '../utils';
import Button from '../button';
import { Flex } from '../flex';
import { HStack } from '../h-stack';
Expand Down Expand Up @@ -70,6 +71,8 @@ export const ColorInputWrapper = styled( Flex )`
`;

export const ColorfulWrapper = styled.div`
${ boxSizingReset };
width: 216px;
.react-colorful {
Expand Down

0 comments on commit a7f569c

Please sign in to comment.