Stephen Buergler created MSKINS-264:
---------------------------------------

             Summary: dark mode?
                 Key: MSKINS-264
                 URL: https://issues.apache.org/jira/browse/MSKINS-264
             Project: Maven Skins
          Issue Type: New Feature
          Components: Fluido Skin
            Reporter: Stephen Buergler


Think it would be possible or a good idea to add a dark mode?
In css there are three things that can be used to implement a dark mode:
https://developer.mozilla.org/en-US/docs/Web/CSS/color-scheme
The color-scheme attribute which changes a bunch of the defaults:

{code:css}
:root {
  color-scheme: light dark;
}
{code}

The light-dark function:

{code:css}
.element {
  color: light-dark(black, white);
  background-color: light-dark(white, black);
}
{code}

And media queries:

{code:css}
@media (prefers-color-scheme: light) {
  .element {
    color: black;
    background-color: white;
  }
}

@media (prefers-color-scheme: dark) {
  .element {
    color: white;
    background-color: black;
  }
}
{code}
Then you just set it in your OS and your browser switches all the colors.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to