WordPress / WordPress/create-block-theme

Automatically enqueue style.css when creating a blank theme

Open
#334 15 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
JavaScript
Stars
417
Forks
66
PR merge metrics
No merged PRs in 30d

Description

Pulling in feedback from the FSE Outreach program's Build A Block Theme exploration:

There is an empty style sheet added when a blank theme is created with CBT plugin. But adding CSS to it doesn’t work until a functions.php is added to enqueue it. I think that style.css should automatically be enqueued or that a functions.php with the enqueue should be included. I am trying to use only the editor, but think that if the stylesheet is there, it should be usable.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the blank-theme creation flow in the create-block-theme plugin, focusing on the generated style.css and the alternative functions.php enqueue mentioned in the issue. Determine how a newly created blank theme should make its stylesheet usable without manual PHP changes, then verify the generated theme behaves correctly in the editor.

Written by the indexing model from the issue text.

Assessment

Tech stack
css
Domain
tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
43/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.