[wp-trac] [WordPress Trac] #44763: Custom CSS line number color contrast is too low

WordPress Trac noreply at wordpress.org
Thu Aug 9 12:32:55 UTC 2018


#44763: Custom CSS line number color contrast is too low
-------------------------------------------------+-------------------------
 Reporter:  earnjam                              |       Owner:  (none)
     Type:  defect (bug)                         |      Status:  new
 Priority:  normal                               |   Milestone:  4.9.9
Component:  Customize                            |     Version:  4.7
 Severity:  normal                               |  Resolution:
 Keywords:  needs-patch good-first-bug has-      |     Focuses:
  screenshots                                    |  accessibility
-------------------------------------------------+-------------------------
Changes (by audrasjb):

 * keywords:  needs-patch good-first-bug => needs-patch good-first-bug has-
     screenshots
 * milestone:  Awaiting Review => 4.9.9


Comment:

 Hello and thanks for your Trac Ticket.

 Nice catch.

 Indeed, the color contrast is not compliant with AA criteria.

 I made some checks/tests:
 - If we keep current `#F7F7F7` for the background color of the gutter, we
 need at least `#666` for line numbers.
 - we need to override CodeMirror defaults.
 - we need to generate `.min.css` files, for both LTR and RTL versions.
 - the good CSS file to edit is `wp-admin/css/code-editor.css`.

 I guess the following CSS rule should do the job:
 ```
 .wrap .CodeMirror .CodeMirror-linenumber { color: #666; }
 ```

 A great `good-first-bug` for eventual new contributors :)

 Cheers,
 Jb

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


More information about the wp-trac mailing list