Skip to content

Commit

Permalink
Fix font variants count color contrast and l10n.
Browse files Browse the repository at this point in the history
  • Loading branch information
afercia committed Jan 23, 2024
1 parent 38f8eaa commit 8dbf156
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

0 comments on commit 8dbf156

Please sign in to comment.