Skip to content

Commit 9581694

Browse files
authored
Components: Retire DARK_GRAY colors (#43773)
* Retire `DARK_GRAY[ 500 ]` → `GRAY[ 700 ]` * Retire `DARK_GRAY[ 300 ]` → `GRAY[ 700 ]` * Add changelog
1 parent bf88267 commit 9581694

File tree

4 files changed

+4
-15
lines changed

4 files changed

+4
-15
lines changed

packages/components/CHANGELOG.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,8 @@
1111

1212
- `ToggleControl`: Add `__nextHasNoMargin` prop for opting into the new margin-free styles ([#43717](https://github.com/WordPress/gutenberg/pull/43717)).
1313
- `CheckboxControl`: Add `__nextHasNoMargin` prop for opting into the new margin-free styles ([#43720](https://github.com/WordPress/gutenberg/pull/43720)).
14-
15-
### Enhancements
16-
14+
- `RangeControl`: Tweak dark gray marking color to be consistent with the grays in `@wordpress/base-styles` ([#43773](https://github.com/WordPress/gutenberg/pull/43773)).
15+
- `UnitControl`: Tweak unit dropdown color to be consistent with the grays in `@wordpress/base-styles` ([#43773](https://github.com/WordPress/gutenberg/pull/43773)).
1716
- `CardHeader`, `CardBody`, `CardFooter`: Tweak `isShady` background colors to be consistent with the grays in `@wordpress/base-styles` ([#43719](https://github.com/WordPress/gutenberg/pull/43719)).
1817
- `InputControl`, `SelectControl`: Tweak `disabled` colors to be consistent with the grays in `@wordpress/base-styles` ([#43719](https://github.com/WordPress/gutenberg/pull/43719)).
1918

packages/components/src/range-control/styles/range-control-styles.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ export const Mark = styled.span`
152152

153153
const markLabelFill = ( { isFilled }: RangeMarkProps ) => {
154154
return css( {
155-
color: isFilled ? COLORS.darkGray[ 300 ] : COLORS.lightGray[ 600 ],
155+
color: isFilled ? COLORS.gray[ 700 ] : COLORS.lightGray[ 600 ],
156156
} );
157157
};
158158

packages/components/src/unit-control/styles/unit-control-styles.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ const baseUnitLabelStyles = ( { selectSize }: SelectProps ) => {
6666
box-sizing: border-box;
6767
padding: 2px 1px;
6868
width: 20px;
69-
color: ${ COLORS.darkGray[ 500 ] };
69+
color: ${ COLORS.gray[ 800 ] };
7070
font-size: 8px;
7171
line-height: 1;
7272
letter-spacing: -0.5px;

packages/components/src/utils/colors-values.js

-10
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,6 @@ const GRAY = {
2222
100: '#f0f0f0',
2323
};
2424

25-
// TODO: Replace usages of these with the equivalents in `GRAY`
26-
const DARK_GRAY = {
27-
500: '#555d66', // Use this most of the time for dark items.
28-
300: '#6c7781', // Lightest gray that can be used for AA text contrast.
29-
};
30-
3125
// TODO: Replace usages of these with the equivalents in `GRAY`
3226
const LIGHT_GRAY = {
3327
800: '#b5bcc2',
@@ -66,10 +60,6 @@ const UI = {
6660
};
6761

6862
export const COLORS = Object.freeze( {
69-
/**
70-
* @deprecated Try to use `gray` instead.
71-
*/
72-
darkGray: DARK_GRAY,
7363
/**
7464
* The main gray color object.
7565
*/

0 commit comments

Comments
 (0)