Hi,

Eliot Lear <l...@lear.ch> wrote:
> The only aspect of responsive design I really
> think we're talking about is dark mode, in that if it is supported it
> must be done in a way that is legible.  Maybe that is a bit TOO
> prescriptive, tho.

This takes a little bit of CSS variable use to make this work, but it is
not that difficult. It applies to the regular HTML as well as the SVG
elements.

I think the plaintext and PDFs should just be dark text on light colors.

I'll put an example below. It takes a little bit of JavaScript to react to
system changes. Either if the user goes into the system control panel and
changes the theme, or the system changes at sunset.

thanks,
Rob

@charset "UTF-8";
:root {
    /* color defaults */
    --light-primary-color: #48d597;
    --light-font-color: #3A3B39;
    --light-svg-color: #d5d5d5;
    --light-bg-color: #ffffff;

    --dark-primary-color: #48d597;
    --dark-font-color: #efefef;
    --dark-svg-color: #393939;
    --dark-bg-color: #222222;

    --primary-color: var(--light-primary-color);
    --font-color: var(--light-font-color);
    --svg-color: var(--light-svg-color);
    --bg-color: var(--light-bg-color);
}

@media (prefers-color-scheme: dark) {
  :root {
    --primary-color: var(--dark-primary-color);
    --font-color: var(--dark-font-color);
    --svg-color: var(--dark-svg-color);
    --bg-color: var(--dark-bg-color);
  }
}
-- 
rswg mailing list -- rswg@rfc-editor.org
To unsubscribe send an email to rswg-le...@rfc-editor.org

Reply via email to