Automatically enqueue style.css when creating a blank theme#780
Automatically enqueue style.css when creating a blank theme#780theaminulai wants to merge 2 commits intoWordPress:trunkfrom
Conversation
|
@theaminuli, @t-hamano PR looks good |
|
@theaminuli thanks for the PR! Personally, I'm not sure if loading styles in a particular way is the best way, and I think we should discuss this a bit more before moving forward with this PR. |
|
Personally in my themes I usually load my styles from an asset other than the While it would be handy to have that setup for me for my CBT created theme that doesn't feel appropriate. There's a ton of other ways an opinions on how/where those styles should be loaded. If you need those loaded I feel like you're taking the created theme beyond "basic" and "universal" which is what I think is where CBT should be landing. (RE: As opinion-less as possible) Just my 0.02 since the reality is that I nearly always start with my own starter theme with all the things setup the way I like and just duplicate that instead of creating a blank one. |
What?
Automatically enqueue style.css when creating a blank theme with the Create Block Theme (CBT) plugin.
Why?
Currently, when a blank theme is created, an empty style.css file is added, but adding CSS to it does not take effect until a functions.php file is added to enqueue the stylesheet. This creates confusion for users who want to work directly in the editor or prefer using style.css instead of the Additional CSS area. Automatically enqueuing style.css ensures that the stylesheet works out-of-the-box for those who want to use it.
Fixes / Reference
Fixes #334
How to test: