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
The .has-no-block helper function in the Gutenberg init.php doesn't show on archive and search results pages.
Even though the archive or search results page contain blocks themselves within the posts, I think the archive and search results pages should still include the .has-no-blocks body class as these aren't actually editable pages.
So if we were to use the .has-no-blocks body class for Gutenberg block page specific styling like for example:
body:not(.has-no-blocks) .entry-content {
/* Do some Gutenberg block page specific styling
which could include margins, padding or widths */
}
Then those styles would also get applied to posts on archive and search results pages too where this block page specific styling should not be included.
The text was updated successfully, but these errors were encountered:
if ( has_blocks() ) {
$classes[] = 'has-blocks';
}
Because if the Gutenberg init.php is disabled, then any styles added to the main stylesheet for '.has-no-blocks' will no longer work.
Where as the 'has-blocks' class is 100% Gutenberg specific for folks who may want to style block pages different, remove paddings, margins, width etc too.
The .has-no-block helper function in the Gutenberg init.php doesn't show on archive and search results pages.
Even though the archive or search results page contain blocks themselves within the posts, I think the archive and search results pages should still include the .has-no-blocks body class as these aren't actually editable pages.
So if we were to use the .has-no-blocks body class for Gutenberg block page specific styling like for example:
Then those styles would also get applied to posts on archive and search results pages too where this block page specific styling should not be included.
The text was updated successfully, but these errors were encountered: