Make WordPress Core

Opened 20 months ago

Last modified 19 months ago

#54178 new enhancement

Use theme.json for theme metadata instead of style.css

Reported by: jamesbonham's profile jamesbonham Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Themes Keywords:
Focuses: Cc:

Description

Most themes no longer rely use one big css file compiled to style.css. This means that the file is often only used for theme metadata (name, description, version etc.). From an outside perspective this makes no sense.

Seeing as the comment in style.css is structured data it would be most logical to allow theme developers to add it all to the theme.json file.

I know this would have some far reaching implications, as many places read the info in style.css, but it would be logical and would encourage developers to start using the theme.json file more.

Change History (1)

#1 @sabbirshouvo
19 months ago

I think the implementation approach should be checking for both style.css and theme.json if any theme contains one of these should be considered as a valid theme.

This approach will be backward compatible as all of the current themes in WordPress directly doesn't contain style.css and all previous version of WordPress uses that file to check theme metadata.

If any core contributor encourages then I will dig down this and add a patch!

Note: See TracTickets for help on using tickets.