-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Style engine: elements backend support (#40987)
* Initial commit - not working Trying to come up with a model for elements * Some more faffing about. This time, let's pass the block_style-like object from the style.elements array to the style engine since that's what it expects anyway * Here's an attempt at making classnames optional. Where a consumer specifies that they want to return classnames from preset values, the style engine will do that instead of building css var style values. * This commit registers block support styles so we can print them out in a single style tag. The idea is to extend this to layout as well. * LINT! * Favouring a `css_vars` options flag over a `classnames` options flag. This means the style engine will always attempt to output classes by default using the incoming `var:preset|*` values. The consumer is free to ignore them. The style engine will skip over `var:preset|*` values when building CSS rules. To return CSS vars in the CSS rules however, the consumer will need to specify a `css_vars` flag. The style engine will try to return `var(--preset--*)` values from `var:preset|*` values when building CSS rules. This gives us a way to return both the classname and CSS var if we wish, rather than a CSS var OR a classname. * Removing registration, bundling and rendering of block styles. Will separate that out into another PR> * Remove unused var * Typo in comments * Updating comments Fixing typos Renaming variables for clarity Props @andrewserong
- Loading branch information
Showing
3 changed files
with
177 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.