Hey Brian, i want to thank you for these videos, you've cleared up a decent amount of things I've been struggling with since Gutenberg came out in the few videos you have, ive struck gold! thank you man! appreciate it
@BrianCoords Жыл бұрын
Thank you! If you have any topics you think should be covered, let me know.
@maurobono53244 күн бұрын
Brian great tutorial. What if I want to create multiple block styles in a single plugin? Which is the best approach for loading CSS? is it possible to load a single CSS file that contains all my block styles?
@BrianCoords2 күн бұрын
You definitely can. You can just load one CSS file like you would normally, since block styles just add a class to an element. Just make sure you enqueue it for the frontend AND for the block editor.
@GrantAmbrose2 ай бұрын
Is there a downside to using the PHP version vs the JS? and is what's in this video still how you're creating your Block Styles?
@BrianCoords2 ай бұрын
I believe the main difference is that the PHP version lets you define a stylesheet and handles loading the CSS on the frontend. In the JS version, you're responsible for making sure any stylesheets/CSS gets loaded on the frontend. I do still use this method, but there's some stuff coming in 6.6 that might change my workflow. For now, in my block theme framework, I have a method for loading per block CSS, so I register the styles in JS and then my theme loads the correct block styles.