Skip to content

Commit

Permalink
Fix font variants count color contrast and l10n. (#58117)
Browse files Browse the repository at this point in the history
  • Loading branch information
afercia authored Jan 24, 2024
1 parent 7f3b8c5 commit b3fdade
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* WordPress dependencies
*/
import { _n } from '@wordpress/i18n';
import { _n, sprintf } from '@wordpress/i18n';
import {
__experimentalHStack as HStack,
__experimentalItem as Item,
Expand Down Expand Up @@ -32,9 +32,12 @@ function FontFamilyItem( { font } ) {
<Item onClick={ handleClick }>
<HStack justify="space-between">
<FlexItem style={ previewStyle }>{ font.name }</FlexItem>
<FlexItem style={ { color: '#9e9e9e' } }>
{ variantsCount }{ ' ' }
{ _n( 'variant', 'variants', variantsCount ) }
<FlexItem className="edit-site-global-styles-screen-typography__font-variants-count">
{ sprintf(
/* translators: %d: Number of font variants. */
_n( '%d variant', '%d variants', variantsCount ),
variantsCount
) }
</FlexItem>
</HStack>
</Item>
Expand Down
4 changes: 4 additions & 0 deletions packages/edit-site/src/components/global-styles/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@
border-radius: $radius-block-ui;
}

.edit-site-global-styles-screen-typography__font-variants-count {
color: $gray-700;
}

.edit-site-global-styles-screen-colors {
margin: $grid-unit-20;

Expand Down

1 comment on commit b3fdade

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flaky tests detected in b3fdade.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/7640600121
📝 Reported issues:

Please sign in to comment.