File tree Expand file tree Collapse file tree 1 file changed +14
-9
lines changed
packages/edit-site/src/components/global-styles Expand file tree Collapse file tree 1 file changed +14
-9
lines changed Original file line number Diff line number Diff line change @@ -79,19 +79,24 @@ export default function StyleVariationsContainer( { gap = 2 } ) {
79
79
} ) ;
80
80
}
81
81
// Now merge any global custom CSS from current user styles with global custom CSS in the variation.
82
- const globalCustomCSS =
82
+ const css =
83
83
userStyles ?. css || variation . styles ?. css
84
- ? `${ variation . styles ?. css || '' } ${
85
- userStyles ?. css || ''
86
- } `
87
- : '' ;
84
+ ? {
85
+ css : `${ variation . styles ?. css || '' } ${
86
+ userStyles ?. css || ''
87
+ } `,
88
+ }
89
+ : { } ;
90
+
91
+ const blocks =
92
+ Object . keys ( blockStyles ) . length > 0
93
+ ? { blocks : blockStyles }
94
+ : { } ;
88
95
89
96
const styles = {
90
97
...variation . styles ,
91
- css : globalCustomCSS ,
92
- blocks : {
93
- ...blockStyles ,
94
- } ,
98
+ ...css ,
99
+ ...blocks ,
95
100
} ;
96
101
return {
97
102
...variation ,
You can’t perform that action at this time.
0 commit comments