Skip to content

Commit

Permalink
Enqueue styles with priority, following on from #41015
Browse files Browse the repository at this point in the history
Remove duplicated comments
  • Loading branch information
ramonjd committed May 31, 2022
1 parent 1a0456c commit 37ed4ed
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
10 changes: 1 addition & 9 deletions packages/block-library/src/columns/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,7 @@ function block_core_columns_render( $attributes, $content ) {
);

$style = '.' . $class . '{ --wp--style--unstable-columns-gap: ' . $gap_value . ';}';
// Ideally styles should be loaded in the head, but blocks may be parsed
// after that, so loading in the footer for now.
// See https://core.trac.wordpress.org/ticket/53494.
add_action(
'wp_footer',
function () use ( $style ) {
echo '<style> ' . $style . '</style>';
}
);
gutenberg_enqueue_block_support_styles( $style, 11 );
return $content;
}

Expand Down
2 changes: 0 additions & 2 deletions packages/block-library/src/columns/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@

&.is-style-tablet-stack:not(.is-not-stacked-on-mobile) > .wp-block-column {
@media (max-width: #{ ($break-small - 1) }) {
// Responsiveness: Show at most one columns on mobile. This must be
// important since the Column assigns its own width as an inline style.
flex-basis: 100% !important;
}
// Between mobile and large viewports (tablet), allow 2 columns.
Expand Down

0 comments on commit 37ed4ed

Please sign in to comment.