Direkt zum Inhalt

Devbits

Kleine Code-Schnipsel aus unserem Alltag mit Drupal, PHP und DevOps: Problem, Lösung, Code.

13.04.2026 | Marc Hitscherich

Chrome: Bypass NET::ERR_CERT_INVALID

If a website has an invalid SSL certificate there might be no way to bypass the validation warning and access the actual website. Especially in Chrome sometimes the button beneath the error message to explicitly bypass the certificate warning is not available.

13.11.2025 | Holger Weischenberg

Consider the user's preference for dark or light system colors

The theme should take into account whether the user has selected dark or light colors in the OS settings.

/* Default theme */
:root {
  --Background-Color: #fff;
  --Text-Color: #000;
}

/* Dark theme */
@media (prefers-color-scheme: dark) {
  :root {
    --Background-Color: #000;
    --Text-Color: #fff;
  }
}

Issue:

The theme should take into account whether the user has selected dark or light colors in the OS settings.

Solution:

Use the prefers-color-scheme CSS media feature. See also: documentation at developer.mozilla.org.