Skip to content

Commit

Permalink
Add styles on editor side
Browse files Browse the repository at this point in the history
  • Loading branch information
tellthemachines committed Jun 13, 2024
1 parent f8ed501 commit 368ea61
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,9 @@ export const getNodesWithStyles = ( tree, blockSelectors ) => {
( [ variationName, variation ] ) => {
variations[ variationName ] =
pickStyleKeys( variation );

if ( variation?.css ) {
variations[ variationName ].css = variation.css;
}
const variationSelector =
blockSelectors[ blockName ]
.styleVariationSelectors?.[ variationName ];
Expand Down Expand Up @@ -1041,6 +1043,12 @@ export const toStyles = (
';'
) };}`;
}
if ( styleVariations?.css ) {
ruleset += processCSSNesting(
styleVariations.css,
`:root :where(${ styleVariationSelector })`
);
}
}
}
);
Expand Down

0 comments on commit 368ea61

Please sign in to comment.