Skip to content

Commit

Permalink
ColorPalette: Make popover style consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
mirka committed Aug 24, 2022
1 parent a55f880 commit 048c509
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 19 deletions.
1 change: 1 addition & 0 deletions packages/components/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

- `CustomGradientPicker`, `GradientPicker`: Add `__nextHasNoMargin` prop for opting into the new margin-free styles ([#43387](https://github.com/WordPress/gutenberg/pull/43387)).
- `ToolsPanel`: Tighten grid gaps ([#43424](https://github.com/WordPress/gutenberg/pull/43424)).
- `ColorPalette`: Make popover style consistent ([#43570](https://github.com/WordPress/gutenberg/pull/43570)).
- `ToggleGroupControl`: Improve TypeScript documentation ([#43265](https://github.com/WordPress/gutenberg/pull/43265)).
- `ComboboxControl`: Normalize hyphen-like characters to an ASCII hyphen ([#42942](https://github.com/WordPress/gutenberg/pull/42942)).
- `FormTokenField`: Refactor away from `_.difference()` ([#43224](https://github.com/WordPress/gutenberg/pull/43224/)).
Expand Down
13 changes: 8 additions & 5 deletions packages/components/src/color-palette/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import { VStack } from '../v-stack';
import { Flex, FlexItem } from '../flex';
import { Truncate } from '../truncate';
import { ColorHeading } from './styles';
import DropdownContentWrapper from '../dropdown/dropdown-content-wrapper';

extend( [ namesPlugin, a11yPlugin ] );

Expand Down Expand Up @@ -202,11 +203,13 @@ export default function ColorPalette( {
const Component = showMultiplePalettes ? MultiplePalettes : SinglePalette;

const renderCustomColorPicker = () => (
<ColorPicker
color={ value }
onChange={ ( color ) => onChange( color ) }
enableAlpha={ enableAlpha }
/>
<DropdownContentWrapper paddingSize="none">
<ColorPicker
color={ value }
onChange={ ( color ) => onChange( color ) }
enableAlpha={ enableAlpha }
/>
</DropdownContentWrapper>
);

const colordColor = colord( value );
Expand Down
14 changes: 0 additions & 14 deletions packages/components/src/color-palette/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -31,20 +31,6 @@
}
}

.components-dropdown__content.components-color-palette__custom-color-dropdown-content .components-popover__content {
overflow: visible;
box-shadow: 0 4px 4px rgba(0, 0, 0, 0.05);
border: none;
outline: none;
border-radius: $radius-block-ui;
padding: 0;

.react-colorful__saturation {
border-top-right-radius: $radius-block-ui;
border-top-left-radius: $radius-block-ui;
}
}

.components-color-palette__custom-color-name {
text-align: left;
}
Expand Down

0 comments on commit 048c509

Please sign in to comment.