Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🚧 WIP: Use the style engine in global-styles 🚧 🧪 #48955

Draft
wants to merge 18 commits into
base: trunk
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
10 changes: 2 additions & 8 deletions lib/block-supports/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,8 @@ function _gutenberg_add_block_level_preset_styles( $pre_render, $block ) {
);
$theme_json_object = new WP_Theme_JSON_Gutenberg( $theme_json_shape );

$styles = '';

// include preset css variables declaration on the stylesheet.
$styles .= $theme_json_object->get_stylesheet(
$theme_json_object->add_stylesheet_to_rules_store(
array( 'variables' ),
null,
array(
Expand All @@ -116,7 +114,7 @@ function _gutenberg_add_block_level_preset_styles( $pre_render, $block ) {
);

// include preset css classes on the the stylesheet.
$styles .= $theme_json_object->get_stylesheet(
$theme_json_object->add_stylesheet_to_rules_store(
array( 'presets' ),
null,
array(
Expand All @@ -125,10 +123,6 @@ function _gutenberg_add_block_level_preset_styles( $pre_render, $block ) {
)
);

if ( ! empty( $styles ) ) {
gutenberg_enqueue_block_support_styles( $styles );
}

return null;
}

Expand Down
Loading