[wp-trac] [WordPress Trac] #53070: Establish a Core CSS deprecation path
WordPress Trac
noreply at wordpress.org
Thu Apr 22 03:31:48 UTC 2021
#53070: Establish a Core CSS deprecation path
------------------------------+-----------------------------
Reporter: isabel_brison | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version:
Severity: normal | Keywords:
Focuses: css, performance |
------------------------------+-----------------------------
Problem: Core CSS is a public API, and gets used as such by plugins. This
means that when a selector is no longer used in wp-admin, deleting any
related CSS rules can still break third party code. However, the cautious
approach of not deleting any CSS leads to bloated files, with a negative
impact on performance.
Solution: define a clear deprecation path for Core CSS, announcing in
advance when any selector and related rules are being deprecated. This
allows third parties to update their code in a timely manner.
What will this look like in practice? As discussed in the CSS meeting:
[https://make.wordpress.org/core/2021/04/13/css-chat-
summary-08-april-2021/],
* When a selector is no longer used in Core, move related CSS to a
`deprecated.css` file.
* This file can be optionally enqueued by plugins that require any of its
CSS.
* Deprecation is announced in the release dev notes.
* Linters and other automated tools can help enforce non-use of deprecated
selectors.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/53070>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list