[wp-trac] [WordPress Trac] #46685: Site Health: audit the CSS and reduce specificity

WordPress Trac noreply at wordpress.org
Thu Mar 28 13:26:45 UTC 2019


#46685: Site Health: audit the CSS and reduce specificity
-----------------------------------+-------------------------------
 Reporter:  afercia                |       Owner:  (none)
     Type:  defect (bug)           |      Status:  new
 Priority:  normal                 |   Milestone:  5.2
Component:  Administration         |     Version:  trunk
 Severity:  normal                 |  Resolution:
 Keywords:  site-health has-patch  |     Focuses:  coding-standards
-----------------------------------+-------------------------------
Changes (by afercia):

 * keywords:  needs-patch site-health => site-health has-patch


Comment:

 [attachment:"46685.diff"]

 - simplifies selectors and reduces specificity
 - `.site-health` is a broad selector as it's applied on the body:
 shouldn't be used to target generic elements as they could live also in
 the admin menu, top bar, etc.
 - removes the `wrap` class: seems unnecessary and allows to simplify the
 headings rulesets
 - currently, the tables don't have `thead` elements: removed the related
 ruleset
 - renames css classes so some elements can be targeted directly
 - removes unnecessary properties e.g. `display: block` on `div` and `nav`
 elements

 Note:
 - couldn't find a `.spinner` used in these pages: removed but please
 double check

 @clorith when you have a chance, your testing/revision is welcome!

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


More information about the wp-trac mailing list