Skip to content
Closed
Changes from 1 commit
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update the name of the styles array
  • Loading branch information
carolinan committed Apr 17, 2023
commit 1413f494a9999465a7524d44f9d4f6ffe429ba59
Original file line number Diff line number Diff line change
Expand Up @@ -1168,11 +1168,11 @@ export function useGlobalStylesOutput() {

// Loop through the elements to check if there are custom CSS values.
// If there are, push the selector together with
// the CSS value to the 'stylesheets' array.
// the CSS value to the 'styles' array.
Object.entries( ELEMENTS ).forEach( ( element ) => {
const [ name, elementsSelector ] = element;
if ( mergedConfig.styles.elements[ name ]?.css ) {
stylesheets.push( {
styles.push( {
css: processCSSNesting(
mergedConfig.styles.elements[ name ]?.css,
elementsSelector
Expand All @@ -1184,7 +1184,7 @@ export function useGlobalStylesOutput() {

// Loop through the blocks to check if there are custom CSS values.
// If there are, get the block selector and push the selector together with
// the CSS value to the 'stylesheets' array.
// the CSS value to the 'styles' array.
getBlockTypes().forEach( ( blockType ) => {
if ( mergedConfig.styles.blocks[ blockType.name ]?.css ) {
const selector = blockSelectors[ blockType.name ].selector;
Expand All @@ -1206,7 +1206,7 @@ export function useGlobalStylesOutput() {
const variationSelector =
blockSelectors[ blockType.name ]
.styleVariationSelectors[ variation[ 0 ] ];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably add a version of the "not" selector in here, otherwise styles applied to the default variation won't appear in the editor.

stylesheets.push( {
styles.push( {
css: processCSSNesting(
variation[ 1 ].css,
variationSelector
Expand Down