Discussion
Loading...

Post

Log in
  • About
  • Code of conduct
  • Privacy
  • About Bonfire
Simon Brooke
Simon Brooke
@simon_brooke@mastodon.scot  ·  activity timestamp 2 days ago

I visited a popular #OpenSource documentation site this morning, and the glare almost blinded me.

Folk, in this day and age, if you run a website, there is NO EXCUSE for not implementing `@media: prefers-color-scheme(dark)`

But, I thought, this is open source! I can submit a pull request to fix this!

Reader, there are ONE HUNDRED AND FORTY-FOUR distinct colours specified in three different syntaxes.

#CSS
#WebDesign
#NoExcuse

  • Copy link
  • Flag this post
  • Block
MarjorieR
MarjorieR
@marjolica@social.linux.pizza replied  ·  activity timestamp 2 days ago

@simon_brooke ditto the reverse - will someone do something about the Met Office's new weather app?
I hate dark mode. I know others feel the opposite which is why there should be a choice.

  • Copy link
  • Flag this comment
  • Block
Simon Brooke
Simon Brooke
@simon_brooke@mastodon.scot replied  ·  activity timestamp 2 days ago

@marjolica which is why

@media: prefers-color-scheme()

exists:

https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/At-rules/@media/prefers-color-scheme

(I'm also not impressed by the MetOffice changes!)

prefers-color-scheme - CSS | MDNMDN

The prefers-color-scheme CSS media feature is used to detect if a user has requested light or dark color themes. A user indicates their preference through an operating system setting (e.g., light or dark mode) or a user agent setting.
  • Copy link
  • Flag this comment
  • Block
Jon lower-chance-of-Snowfield
Jon lower-chance-of-Snowfield
@urlyman@mastodon.social replied  ·  activity timestamp 2 days ago

@simon_brooke chastened. Thanks

  • Copy link
  • Flag this comment
  • Block
Simon Brooke
Simon Brooke
@simon_brooke@mastodon.scot replied  ·  activity timestamp 2 days ago

@urlyman We've all been there. In more than thirty years of #WebDesign I've written some horrible things myself. I now deliberately separate layout styling and colour styling into separate files, to simplify reskinning colour. But really, if you're using more than a dozen colours on a page, WHY?

#CSS should be simple!

  • Copy link
  • Flag this comment
  • Block
Jon lower-chance-of-Snowfield
Jon lower-chance-of-Snowfield
@urlyman@mastodon.social replied  ·  activity timestamp 2 days ago

@simon_brooke sounds thoughts 🙏

  • Copy link
  • Flag this comment
  • Block

BT Free Social

BT Free is a non-profit organization founded by @ozoned@btfree.social . It's goal is for digital privacy rights, advocacy and consulting. This goal will be attained by hosting open platforms to allow others to seamlessly join the Fediverse on moderated instances or by helping others join the Fediverse.

BT Free Social: About · Code of conduct · Privacy ·
Bonfire social · 1.0.1 no JS en
Automatic federation enabled
Log in
  • Explore
  • About
  • Code of Conduct