Visitar URL original
Support for "prefers-color-scheme" · Issue #278 · squizlabs/HTML_CodeSniffer · GitHub
Skip to content

Support for "prefers-color-scheme" #278

Open

Description

@alexiscott

HTML code sniffer, which is what PA11y uses for these rules, does not appear to support the CSS @media rule: @media (prefers-color-scheme: dark) {}

More details here: https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme

This means that when pally-ci runs it's tests, it does not see the any non-compliant CSS. An example might be:



<style>
 @media (prefers-color-scheme: dark) {
   .prefers {
     background: black;
     color: black;
   }
 }
</style>

<div class="prefers">
  I "prefer" a black background, and black text, that nobody can read!
</div>

Is this a feature that will be added to pa11y?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions