Enqueue /css/blocks.css with enqueue_block_assets?
zgordon opened this issue · 2 comments
Would it make sense to break the enqueuing of the block.css file from enqueuing with wp_enqueue_scripts and enqueue it with enqueue_block_assets instead?
gutenberg-starter-theme/functions.php
Line 142 in b77d211
My thought for this approach is that if people want to apply future block styles and have them visible in the editor, they can add to the block.css file and those styles would automatically show up in the editor and not require them to add another CSS file and enqueue it with enqueue_block_assets.
I realize that this may mess things up if the code for centering non wide and full width blocks goes in this same file [https://github.com//issues/30]. However, maybe this could be moved to the style.css file as a generic styling for the frontend only?
NOTE: I may be completely missing a place where block styles for the frontend and editor would go! :) But figured it would be helpful if it doesn't already exist :)
I am going a little back and forth on this one.
My idea was this (which maybe we can iterate on):
- block.css for blocks front facing
- edit.css for blocks/styling on editor back end
Would that work?
I think that that could work.
Just as long as there is a way for folks to easily write styles that also show up in the editor (and the frontend).
Then if there are just frontend styles they go in block.css.
I think that makes sense.