diff --git a/packages/components/CHANGELOG.md b/packages/components/CHANGELOG.md index b72692eb116d1d..cc06857398fb6c 100644 --- a/packages/components/CHANGELOG.md +++ b/packages/components/CHANGELOG.md @@ -21,6 +21,8 @@ ### Bug Fix - Use `Object.assign` instead of `{ ...spread }` syntax to avoid errors in the code generated by TypeScript ([#39932](https://github.com/WordPress/gutenberg/pull/39932)). +- `ItemGroup`: Ensure that the Item's text color is not overriden by the user agent's button color ([#40055](https://github.com/WordPress/gutenberg/pull/40055)). +- `Surface`: Use updated UI text color `#1e1e1e` instead of `#000` ([#40055](https://github.com/WordPress/gutenberg/pull/40055)). - `CustomSelectControl`: Make chevron consistent with `SelectControl` ([#40049](https://github.com/WordPress/gutenberg/pull/40049)). ## 19.7.0 (2022-03-23) diff --git a/packages/components/src/card/test/__snapshots__/index.js.snap b/packages/components/src/card/test/__snapshots__/index.js.snap index eea876b0cffe56..f36ceca8dcc7f8 100644 --- a/packages/components/src/card/test/__snapshots__/index.js.snap +++ b/packages/components/src/card/test/__snapshots__/index.js.snap @@ -124,7 +124,7 @@ Snapshot Diff: "background-color": "#fff", - "border-radius": "calc(2px - 1px)", "box-shadow": "0 0 0 1px rgba(0, 0, 0, 0.1)", - "color": "#000", + "color": "#1e1e1e", "outline": "none", "position": "relative", }, @@ -174,8 +174,8 @@ Snapshot Diff: @@ -1,30 +1,30 @@
@@ -213,7 +213,7 @@ Object { "asFragment": [Function], "baseElement": .emotion-0 { background-color: #fff; - color: #000; + color: #1e1e1e; position: relative; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1); outline: none; @@ -469,7 +469,7 @@ Object { , "container": .emotion-0 { background-color: #fff; - color: #000; + color: #1e1e1e; position: relative; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1); outline: none; @@ -809,7 +809,7 @@ Compared values have no visual difference. exports[`Card Card component should warn when the isElevated prop is passed 1`] = ` .emotion-0 { background-color: #fff; - color: #000; + color: #1e1e1e; position: relative; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1); outline: none; diff --git a/packages/components/src/flyout/test/__snapshots__/index.js.snap b/packages/components/src/flyout/test/__snapshots__/index.js.snap index 1759d8ddb0e8b5..66893021274f94 100644 --- a/packages/components/src/flyout/test/__snapshots__/index.js.snap +++ b/packages/components/src/flyout/test/__snapshots__/index.js.snap @@ -3,7 +3,7 @@ exports[`props should render correctly 1`] = ` .emotion-1 { background-color: #fff; - color: #000; + color: #1e1e1e; position: relative; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1); outline: none; diff --git a/packages/components/src/item-group/styles.ts b/packages/components/src/item-group/styles.ts index 131754cfa54b51..cb2758752e6562 100644 --- a/packages/components/src/item-group/styles.ts +++ b/packages/components/src/item-group/styles.ts @@ -36,6 +36,7 @@ export const item = css` width: 100%; display: block; margin: 0; + color: inherit; `; export const bordered = css` diff --git a/packages/components/src/item-group/test/__snapshots__/index.js.snap b/packages/components/src/item-group/test/__snapshots__/index.js.snap index 0c7f8072e17ace..f6e84366baaba4 100644 --- a/packages/components/src/item-group/test/__snapshots__/index.js.snap +++ b/packages/components/src/item-group/test/__snapshots__/index.js.snap @@ -11,8 +11,8 @@ Snapshot Diff: role="listitem" >
@@ -24,8 +24,8 @@ Snapshot Diff: role="listitem" >
@@ -44,8 +44,8 @@ Snapshot Diff: role="listitem" >
@@ -78,6 +78,7 @@ exports[`ItemGroup ItemGroup component should render correctly 1`] = ` width: 100%; display: block; margin: 0; + color: inherit; border-radius: 2px; } @@ -120,8 +121,8 @@ Snapshot Diff: role="listitem" >
@@ -147,8 +148,8 @@ Snapshot Diff: role="listitem" >
diff --git a/packages/components/src/surface/styles.js b/packages/components/src/surface/styles.js index 1c54c45b69860e..26d8827e49cdba 100644 --- a/packages/components/src/surface/styles.js +++ b/packages/components/src/surface/styles.js @@ -10,7 +10,7 @@ import { CONFIG, COLORS } from '../utils'; export const Surface = css` background-color: ${ CONFIG.surfaceColor }; - color: ${ COLORS.black }; + color: ${ COLORS.darkGray.primary }; position: relative; `; diff --git a/packages/components/src/surface/test/__snapshots__/index.js.snap b/packages/components/src/surface/test/__snapshots__/index.js.snap index 043575488d0e70..fc61465bc2569c 100644 --- a/packages/components/src/surface/test/__snapshots__/index.js.snap +++ b/packages/components/src/surface/test/__snapshots__/index.js.snap @@ -6,8 +6,8 @@ Snapshot Diff: + Second value
@@ -21,8 +21,8 @@ Snapshot Diff: + Second value
@@ -36,8 +36,8 @@ Snapshot Diff: + Second value
@@ -51,8 +51,8 @@ Snapshot Diff: + Second value
@@ -63,7 +63,7 @@ Snapshot Diff: exports[`props should render correctly 1`] = ` .emotion-0 { background-color: #fff; - color: #000; + color: #1e1e1e; position: relative; } @@ -82,8 +82,8 @@ Snapshot Diff: + Second value
diff --git a/packages/edit-site/src/components/global-styles/header.js b/packages/edit-site/src/components/global-styles/header.js index 5bc5b539e11c99..abc162acc652d8 100644 --- a/packages/edit-site/src/components/global-styles/header.js +++ b/packages/edit-site/src/components/global-styles/header.js @@ -9,7 +9,7 @@ import { __experimentalView as View, } from '@wordpress/components'; import { isRTL, __ } from '@wordpress/i18n'; -import { chevronRight, chevronLeft, Icon } from '@wordpress/icons'; +import { chevronRight, chevronLeft } from '@wordpress/icons'; /** * Internal dependencies @@ -22,12 +22,7 @@ function ScreenHeader( { title, description } ) { - } + icon={ isRTL() ? chevronRight : chevronLeft } size="small" aria-label={ __( 'Navigate to the previous view' ) } /> diff --git a/packages/edit-site/src/components/global-styles/icon-with-current-color.js b/packages/edit-site/src/components/global-styles/icon-with-current-color.js new file mode 100644 index 00000000000000..f20289d90363b6 --- /dev/null +++ b/packages/edit-site/src/components/global-styles/icon-with-current-color.js @@ -0,0 +1,21 @@ +/** + * External dependencies + */ +import classnames from 'classnames'; + +/** + * WordPress dependencies + */ +import { Icon } from '@wordpress/components'; + +export function IconWithCurrentColor( { className, ...props } ) { + return ( + + ); +} diff --git a/packages/edit-site/src/components/global-styles/navigation-button.js b/packages/edit-site/src/components/global-styles/navigation-button.js index 2feb03b3816e6f..5ad79d13ba117f 100644 --- a/packages/edit-site/src/components/global-styles/navigation-button.js +++ b/packages/edit-site/src/components/global-styles/navigation-button.js @@ -8,14 +8,18 @@ import { FlexItem, __experimentalHStack as HStack, } from '@wordpress/components'; -import { Icon } from '@wordpress/icons'; + +/** + * Internal dependencies + */ +import { IconWithCurrentColor } from './icon-with-current-color'; function GenericNavigationButton( { icon, children, ...props } ) { return ( { icon && ( - + { children } ) } diff --git a/packages/edit-site/src/components/global-styles/screen-root.js b/packages/edit-site/src/components/global-styles/screen-root.js index 5e708d38c413ed..66c36cdad1b443 100644 --- a/packages/edit-site/src/components/global-styles/screen-root.js +++ b/packages/edit-site/src/components/global-styles/screen-root.js @@ -13,13 +13,14 @@ import { CardMedia, } from '@wordpress/components'; import { isRTL, __ } from '@wordpress/i18n'; -import { chevronLeft, chevronRight, Icon } from '@wordpress/icons'; +import { chevronLeft, chevronRight } from '@wordpress/icons'; import { useSelect } from '@wordpress/data'; import { store as coreStore } from '@wordpress/core-data'; /** * Internal dependencies */ +import { IconWithCurrentColor } from './icon-with-current-color'; import { NavigationButton } from './navigation-button'; import ContextMenu from './context-menu'; import StylesPreview from './preview'; @@ -46,7 +47,7 @@ function ScreenRoot() { { __( 'Browse styles' ) } - { __( 'Blocks' ) } - diff --git a/packages/edit-site/src/components/global-styles/style.scss b/packages/edit-site/src/components/global-styles/style.scss index 16070627a35842..480c060835436c 100644 --- a/packages/edit-site/src/components/global-styles/style.scss +++ b/packages/edit-site/src/components/global-styles/style.scss @@ -93,6 +93,10 @@ } } +.edit-site-global-styles-icon-with-current-color { + fill: currentColor; +} + .edit-site-global-styles__color-indicator-wrapper { // Match the height of the rest of the icons (24px). height: $grid-unit * 3; diff --git a/packages/edit-site/src/components/sidebar/style.scss b/packages/edit-site/src/components/sidebar/style.scss index 134efcbc2f1422..b0e3cdfd1463e7 100644 --- a/packages/edit-site/src/components/sidebar/style.scss +++ b/packages/edit-site/src/components/sidebar/style.scss @@ -80,7 +80,7 @@ padding: 0 $grid-unit-10; height: $grid-unit-30; border-radius: $radius-block-ui; - background-color: $black; + background-color: $gray-900; color: $white; align-items: center; font-size: $helptext-font-size;