You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the patterns, the creator can add attributes to the blocks, as long as the block supports it (color, font size, padding etc, and soon, borders).
But what if I want to create a pattern that needs CSS that can't be achieved with the block support?
For example, box shadow, or positioning a block so that it overlaps (See for example Twenty Twenty-One).
Or if the pattern needs to have a mobile and a desktop width style.
Then I would need to add a CSS class to the block inside the pattern and register a custom block style.
If I was making a theme or plugin, that style would break when the plugin or theme was switched, only the content and the block markup would remain on the users install. How will this be solved with the patterns?
Are the block patterns from the block pattern directory going to be accompanied with custom block styles that are saved to a global custom CSS field (think, the additional CSS field in the customizer)?
Or something else? Registered when the pattern is placed?
What would happen to that CSS if the block that has that class is deleted from the saved content?
Or are all block patterns going to be limited to the global styles?
The text was updated successfully, but these errors were encountered:
I think that's the right assumption - the only "style" options we should provide are the ones that have block support (global styles). I don't know offhand if there are any theme restrictions here, or how we should best set that up. Could a pattern use a style that a theme doesn't support? Do we need to declare style settings when initializing the editor? — things to think about as the editor is rebuilt here (#59).
In the patterns, the creator can add attributes to the blocks, as long as the block supports it (color, font size, padding etc, and soon, borders).
But what if I want to create a pattern that needs CSS that can't be achieved with the block support?
For example, box shadow, or positioning a block so that it overlaps (See for example Twenty Twenty-One).
Or if the pattern needs to have a mobile and a desktop width style.
Then I would need to add a CSS class to the block inside the pattern and register a custom block style.
If I was making a theme or plugin, that style would break when the plugin or theme was switched, only the content and the block markup would remain on the users install. How will this be solved with the patterns?
Are the block patterns from the block pattern directory going to be accompanied with custom block styles that are saved to a global custom CSS field (think, the additional CSS field in the customizer)?
Or something else? Registered when the pattern is placed?
What would happen to that CSS if the block that has that class is deleted from the saved content?
Or are all block patterns going to be limited to the global styles?
The text was updated successfully, but these errors were encountered: