where’s my CSS?
-
testing gutenberg using gutenberg and classic editor plugin. I also activated the ‘editor blocks’ plugin and created a wrapper block with content. a block was created and displays the way it should, using both inline styling and canned CSS.
if I de-activate the ‘editor blocks’ plugin, and again edit the post using gutenberg, now the block displays as a ‘classic’ gutenberg block, it has lost its status as a gutenberg block. this is not what I expected. I assume this is done because when the ‘editor blocks’ plugin is not active, then related CSS is not loaded for use by the theme. of course, this assumes that the related CSS is not in the theme’s CSS.
the same happens when you de-activate gutenberg, gutenberg CSS that is loaded if gutenberg is active does not get loaded, and suddenly your theme does not have styling code set for all of the gutenberg classes that gutenberg generates when you create a post or page. theme styling that depends on gutenberg or plugins should be avoided. perhaps gutenber CSS styling code should be moved to the theme’s CSS file, and not depend on gutenberg or plugins to be active. this would also allow the theme user to alter the default CSS styles, without changing the styling for all theme’s on the site.
Al
The topic ‘where’s my CSS?’ is closed to new replies.