Skip to main content
#! code

Main navigation

  • Articles
  • Snippets
  • Tools
  • About
  • Contact

User account menu

  • Log in

Breadcrumb

  1. Home
  2. Search Results

Search Results

Article Posted: 31 Aug 2025

Using Colour Schemes To Create Light And Dark Modes In CSS

… based on the current colour scheme. .some-class { background-image: url(../images/icon-link-light.svg); } @media (prefers-color-scheme: dark) { .some-class { background-image: url(../images/icon-link-dark.svg); } } Using this mechanism you can … none; border: none; span::before { content: ""; background-image: url(../images/icons/sun.svg); width: 25px; display: block; height: …

Category

  • Show all
  • (-)CSS

Type

  • Article

Footer Social

  • Mastodon
  • Github
  • Drupal
  • Discord
  • Patreon

Footer

  • About
  • Authors
  • Projects
  • Support Us
  • Articles
  • Snippets
  • Videos
  • Terms And Licence
  • Contributions Guide
  • Privacy Policy
  • Colophon
  • RSS Feeds

© 2026 #! code
Hash Bang Code Ltd.
Company Registration No 13867421