Skip to content

Commit

Permalink
Tweak color watch size to 32 px
Browse files Browse the repository at this point in the history
  • Loading branch information
ciampo committed Apr 1, 2022
1 parent a978d9f commit db7f5c0
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions packages/edit-site/src/components/global-styles/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ const secondFrame = {
const normalizedWidth = 248;
const normalizedHeight = 152;

const normalizedColorSwatchSize = 32;

const StylesPreview = ( { label, isFocused } ) => {
const [ fontWeight ] = useStyle( 'typography.fontWeight' );
const [ fontFamily = 'serif' ] = useStyle( 'typography.fontFamily' );
Expand Down Expand Up @@ -134,10 +136,15 @@ const StylesPreview = ( { label, isFocused } ) => {
<div
key={ slug }
style={ {
height: 30 * ratio,
width: 30 * ratio,
height:
normalizedColorSwatchSize * ratio,
width:
normalizedColorSwatchSize * ratio,
background: color,
borderRadius: 15 * ratio,
borderRadius:
( normalizedColorSwatchSize *
ratio ) /
2,
} }
/>
) ) }
Expand Down

0 comments on commit db7f5c0

Please sign in to comment.