[wp-trac] [WordPress Trac] #43897: Coding standards: audit a few occurrences of CSS font-weight using keywords instead of numeric values
WordPress Trac
noreply at wordpress.org
Sun Apr 29 10:54:33 UTC 2018
#43897: Coding standards: audit a few occurrences of CSS font-weight using keywords
instead of numeric values
----------------------------+-------------------------
Reporter: afercia | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 5.0
Component: Administration | Version:
Severity: normal | Keywords: needs-patch
Focuses: ui |
----------------------------+-------------------------
Just noticed a few occurrences of `font-weight: bold;` or `font-weight:
normal;` have been recently introduced in core.
As per the [https://make.wordpress.org/core/handbook/best-practices
/coding-standards/css/#values CSS Coding Standards]:
> Font weights should be defined using numeric values (e.g. 400 instead of
normal, 700 rather than bold).
Rationale: see [37740]
**Use numeric font weights instead of keywords.**
> When Open Sans was in use, the 300, 400, and 600 weights were loaded.
400 is the equivalent of normal; however, bold is equivalent to 700, not
600. With the move to system fonts, we need to be specific rather than
relying on the lack of a 700 weight.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/43897>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list