@@ -41,7 +41,10 @@ const secondFrame = {
41
41
} ,
42
42
} ;
43
43
44
- const normalizedWidth = 250 ;
44
+ const normalizedWidth = 248 ;
45
+ const normalizedHeight = 152 ;
46
+
47
+ const normalizedColorSwatchSize = 32 ;
45
48
46
49
const StylesPreview = ( { label, isFocused } ) => {
47
50
const [ fontWeight ] = useStyle ( 'typography.fontWeight' ) ;
@@ -81,7 +84,7 @@ const StylesPreview = ( { label, isFocused } ) => {
81
84
className = "edit-site-global-styles-preview__iframe"
82
85
head = { < EditorStyles styles = { styles } /> }
83
86
style = { {
84
- height : 150 * ratio ,
87
+ height : normalizedHeight * ratio ,
85
88
visibility : ! width ? 'hidden' : 'visible' ,
86
89
} }
87
90
onMouseEnter = { ( ) => setIsHovered ( true ) }
@@ -91,7 +94,7 @@ const StylesPreview = ( { label, isFocused } ) => {
91
94
{ containerResizeListener }
92
95
< motion . div
93
96
style = { {
94
- height : 150 * ratio ,
97
+ height : normalizedHeight * ratio ,
95
98
width : '100%' ,
96
99
background : gradientValue ?? backgroundColor ,
97
100
cursor : 'pointer' ,
@@ -128,15 +131,20 @@ const StylesPreview = ( { label, isFocused } ) => {
128
131
>
129
132
Aa
130
133
</ div >
131
- < VStack spacing = { 2 * ratio } >
134
+ < VStack spacing = { 4 * ratio } >
132
135
{ highlightedColors . map ( ( { slug, color } ) => (
133
136
< div
134
137
key = { slug }
135
138
style = { {
136
- height : 30 * ratio ,
137
- width : 30 * ratio ,
139
+ height :
140
+ normalizedColorSwatchSize * ratio ,
141
+ width :
142
+ normalizedColorSwatchSize * ratio ,
138
143
background : color ,
139
- borderRadius : 15 * ratio ,
144
+ borderRadius :
145
+ ( normalizedColorSwatchSize *
146
+ ratio ) /
147
+ 2 ,
140
148
} }
141
149
/>
142
150
) ) }
0 commit comments