Skip to content

Commit

Permalink
Preset classes: generate them like in the front-end (all classes per …
Browse files Browse the repository at this point in the history
…color first) (#31218)
  • Loading branch information
nosolosw authored Apr 27, 2021
1 parent 63e4ee9 commit 329fe98
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ function getBlockPresetClasses( blockSelector, blockPresets = {} ) {
if ( ! classes ) {
return declarations;
}
classes.forEach( ( { classSuffix, propertyName } ) => {
const presets = get( blockPresets, path, [] );
presets.forEach( ( preset ) => {
const presets = get( blockPresets, path, [] );
presets.forEach( ( preset ) => {
classes.forEach( ( { classSuffix, propertyName } ) => {
const slug = preset.slug;
const value = preset[ valueKey ];
const classSelectorToUse = `.has-${ slug }-${ classSuffix }`;
Expand Down

0 comments on commit 329fe98

Please sign in to comment.