WordPress / WordPress/create-block-theme

`\n` new line characters in the CSS exported for blocks

Open
#408 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

The custom CSS for blocks exported in theme.json contains \n (new line) characters. They are probably added at export time by CBT. They are not interfering with the CSS working as expected but they add noise. Probably we should fix but is low priority because the CSS is working even with those characters.

Example of a commit removing those \n manually:

https://github.com/Automattic/themes/pull/7015/commits/fb5f72e6497841a37a4f0ed4c19e82baff57b4ee

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

Trace how the Create Block Theme plugin exports custom block CSS into theme.json, starting with the export-time path mentioned in the issue. Compare generated output with the linked example commit and verify that exported CSS no longer contains literal \n characters while remaining valid and functional.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.