mdn / yari

The platform code behind MDN Web Docs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Contrast issue with the background-color of <code> elements

glmvc opened this issue · comments

commented

Summary

In both light and dark mode, the background color of the <code> elements can hardly be distinguished from the background color behind it in certain places.

For example, take a look at the zebra-striped "Technical summary" tables, where each odd row has a background-color that is nearly identical to the one of the <code> elements within it.

URL

The issue is global (styling).
Example: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/colgroup#technical_summary

Reproduction steps

The issue is visual (styling).
Please visit the sample URL or check out the screenshots below.

Expected behavior

A distinguishable background-color to visually recognize the <code> elements.

Actual behavior

The <code> elements are visually indistinguishable because of the nearly identical background-color.

Device

Desktop

Browser

Chrome

Browser version

Stable

Operating system

Mac OS

Screenshot

light mode

#f2f1f1 on #f9f9fb (Contrast Ratio = 1.07:1)

mdn-technical-summary-light

dark mode

#343434 on #313131 (Contrast Ratio = 1.04:1)

mdn-technical-summary-dark

Anything else?

CSS that sets the background-color for <code>
CSS that sets the background-color for table cells in odd table rows

Validations

this is a self-link (a kind of link in a page that reference to the page itself)

commented

@skyclouds2001 You're right about <colgroup>, but note the <col> link, for example. And it's possible that other links appear in such tables. The "Technical summary" table is just one example.