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', } } > -