Skip to content

Global Styles: an input for custom CSS #30142

@critterverse

Description

@critterverse

This issue stems from the recent FSE call for testing to create a custom 404 page. For my 404 page, I ended up adding several elements via the Customizer (accessible via Appearances > Themes > Customize), such as a site background image. I imagine that most of what I added will eventually be handled by Global Styles but as a designer, there’s always going to be something that could be tweaked a bit further.

There could be input form in the Global Styles panel for custom CSS:

This mockup includes some basic syntax validation, but it can be as little as what is being discussed here, and doesn't necessarily need the row highlight.

Note the details:

  • Full height panel
  • Fullscreen button to open in a modal
  • Ellipsis menu that if need be can contain a link to "read more about CSS"

Issue updated Jan 20.

Initial proposal

What if there was an input form in the Global Styles panel for “additional CSS”? I’ve shown it in these comps living alongside Global Styles top-level options for Color, Typography, and Layout (as proposed in #27473, comment) but it could be more subtle.

Template Parts - Custom CSS - 1

Template Parts - Custom CSS - 2

I expect there might be some passionate arguments on both sides of this issue, and possibly also some important context around the Customizer that I'm missing 😅 Let's discuss!

Tasks

Metadata

Metadata

Labels

Global StylesAnything related to the broader Global Styles efforts, including Styles Engine and theme.jsonNeeds User DocumentationNeeds new user documentation[Type] FeatureNew feature to highlight in changelogs.[Type] TaskIssues or PRs that have been broken down into an individual action to take[Type] Tracking IssueTactical breakdown of efforts across the codebase and/or tied to Overview issues.

Type

No type

Projects

Status

✅ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions