Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enqueue /css/blocks.css with enqueue_block_assets? #36

Open
zgordon opened this issue Feb 15, 2018 · 2 comments
Open

Enqueue /css/blocks.css with enqueue_block_assets? #36

zgordon opened this issue Feb 15, 2018 · 2 comments

Comments

@zgordon
Copy link
Contributor

zgordon commented Feb 15, 2018

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?

wp_enqueue_style( 'gutenbergthemeblocks-style', get_template_directory_uri() . '/css/blocks.css');

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 :)

@karmatosed
Copy link
Member

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?

@zgordon
Copy link
Contributor Author

zgordon commented Mar 6, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants