Open zgordon opened 6 years ago
I am going a little back and forth on this one.
My idea was this (which maybe we can iterate on):
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.
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?
https://github.com/WordPress/gutenberg-starter-theme/blob/b77d21105719181bcaef3f53509ba22e085056ac/functions.php#L142
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/WordPress/gutenberg-starter-theme/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 :)