Skip to content

Commit

Permalink
Fix theme.json generation to handle :host selector in theme layer of …
Browse files Browse the repository at this point in the history
…app.css

- Previously, wordpressThemeJson checked that themeContent starts with  `:root{`
- Tailwind outputs `:root, :host {`, causing an early return.
- Remove '{' and add trim() to support non-minified app.css.
  • Loading branch information
stuart-james committed Feb 2, 2025
1 parent 71b8826 commit 8f74e61
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion resources/js/build/wordpress.js
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ export function wordpressThemeJson({
}

const themeContent = themeMatch[1]
if (!themeContent.startsWith(':root{')) {
if (!themeContent.trim().startsWith(':root')) {
return;
}

Expand Down

0 comments on commit 8f74e61

Please sign in to comment.