[wp-trac] [WordPress Trac] #52429: Combine/globalize the CSS/JS between Site Health & Privacy Settings

WordPress Trac noreply at wordpress.org
Thu Nov 4 20:45:44 UTC 2021


#52429: Combine/globalize the CSS/JS between Site Health & Privacy Settings
-------------------------+---------------------------------------
 Reporter:  xkon         |       Owner:  pbearne
     Type:  enhancement  |      Status:  accepted
 Priority:  normal       |   Milestone:  5.9
Component:  Site Health  |     Version:
 Severity:  normal       |  Resolution:
 Keywords:  has-patch    |     Focuses:  javascript, css, privacy
-------------------------+---------------------------------------

Comment (by ryelle):

 Hi @pbearne, thanks for the PR!

 I'm not sure about `admin-page-*` as the prefix. Maybe `wp-core-ui-*`?
 There's already a body class that uses that term, though I'm not sure of
 its history. IMO, this prefix should identify that this is part of a
 WordPress core "component library" of sorts.

 For backwards compatibility, I think the old class names should stay in
 the HTML & CSS, and you can add the new class names to the components,
 like so:

 {{{
 .privacy-settings-accordion-heading,
 .health-check-accordion-heading,
 .wp-core-ui-accordion-heading {
         ...
 }}}

 {{{
 <h4 class="wp-core-ui-accordion-heading privacy-settings-accordion-
 heading">
 }}}


 That way, if any plugins are using the existing classes to inherit these
 styles, they'll still work, while any new pages will be written using the
 shared classes.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/52429#comment:24>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list