diff --git a/packages/edit-site/src/components/global-styles/preview.js b/packages/edit-site/src/components/global-styles/preview.js index f942df0bb6649..a3dc2c11ed24d 100644 --- a/packages/edit-site/src/components/global-styles/preview.js +++ b/packages/edit-site/src/components/global-styles/preview.js @@ -21,47 +21,32 @@ import { useGlobalStylesOutput } from './use-global-styles-output'; const firstFrame = { start: { - clipPath: 'polygon(0 0, 100% 0, 100% 100%, 0 100%)', - transition: { delay: 0.5 }, + scale: 1, + opacity: 1, }, hover: { - clipPath: [ - 'polygon(0 0, 100% 0, 100% 100%, 0 100%)', - 'polygon(0 0, 100% 0, 100% 100%, 0 100%)', - 'polygon(100% 0, 100% 0, 100% 100%, 100% 100%)', - ], + scale: 0, + opacity: 0, }, }; const midFrame = { hover: { - scaleX: [ 1, 1.3, 1.6 ], - // x: [ '0%', '10%', '20%' ], - clipPath: [ - 'polygon(0 0, 0 0, 0 100%, 0% 100%)', - 'polygon(0 0, 100% 0, 100% 100%, 0 100%)', - 'polygon(100% 0, 100% 0, 100% 100%, 100% 100%)', - ], - transition: { type: 'tween', duration: 1, delay: 0.2 }, + opacity: 1, }, start: { - // x: '70%', - clipPath: 'polygon(0 0, 0 0, 0 100%, 0% 100%)', - transition: { type: 'tween', duration: 1, delay: 0.2 }, + opacity: 0.5, }, }; const secondFrame = { hover: { - clipPath: [ - 'polygon(0 0, 0 0, 0 100%, 0 100%)', - 'polygon(0 0, 100% 0, 100% 100%, 0 100%)', - 'polygon(0 0, 100% 0, 100% 100%, 0 100%)', - ], - transition: { delay: 0.8 }, + scale: 1, + opacity: 1, }, start: { - clipPath: 'polygon(0 0, 0 0, 0 100%, 0 100%)', + scale: 0, + opacity: 0, }, }; @@ -70,7 +55,7 @@ const normalizedHeight = 152; const normalizedColorSwatchSize = 32; -const StylesPreview = ( { label, isFocused } ) => { +const StylesPreview = ( { label, isFocused, isWall } ) => { const [ fontWeight ] = useStyle( 'typography.fontWeight' ); const [ fontFamily = 'serif' ] = useStyle( 'typography.fontFamily' ); const [ headingFontFamily = fontFamily ] = useStyle( @@ -159,16 +144,19 @@ const StylesPreview = ( { label, isFocused } ) => { overflow: 'hidden', } } > -
Aa -
+ { highlightedColors.map( ( { slug, color }, index ) => ( @@ -190,7 +178,7 @@ const StylesPreview = ( { label, isFocused } ) => { animate={ { scale: 1, opacity: 1 } } initial={ { scale: 0.1, opacity: 0 } } transition={ { - delay: index === 1 ? 0.4 : 0.3, + delay: index === 1 ? 0.2 : 0.1, } } /> ) @@ -199,13 +187,15 @@ const StylesPreview = ( { label, isFocused } ) => { { key={ index } style={ { height: '100%', - width: - ( index === 0 && 100 * ratio ) || - ( index === 1 && 20 * ratio ) || - ( index === 2 && 30 * ratio ) || - 60 * ratio, background: color, flexGrow: 1, } } @@ -263,28 +248,12 @@ const StylesPreview = ( { label, isFocused } ) => { color: headingColor, fontWeight: headingFontWeight, lineHeight: '1em', + textAlign: 'center', } } > { label } ) } - { paletteColors && ( - - { paletteColors - .slice( 0, 4 ) - .map( ( { color }, index ) => ( -
- ) ) } - - ) } 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 0674b56319c70..c368837108d91 100644 --- a/packages/edit-site/src/components/global-styles/screen-root.js +++ b/packages/edit-site/src/components/global-styles/screen-root.js @@ -41,7 +41,7 @@ function ScreenRoot() { - + { !! variations?.length && ( diff --git a/packages/edit-site/src/components/global-styles/screen-style-variations.js b/packages/edit-site/src/components/global-styles/screen-style-variations.js index 1ea9301aee5ec..968e9bb52816f 100644 --- a/packages/edit-site/src/components/global-styles/screen-style-variations.js +++ b/packages/edit-site/src/components/global-styles/screen-style-variations.js @@ -125,7 +125,7 @@ function ScreenStyleVariations() { back="/" title={ __( 'Browse styles' ) } description={ __( - 'Choose a different style combination for the theme styles' + 'Choose a variation to change the look of the site.' ) } />