1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-12-28 07:21:32 +03:00
systemd-stable/docs/_includes/header.html
Benjamin Franzke 9b266e4349 docs: add dark mode
Respect the user agent property  `prefers-color-scheme` by
rendering the documentation in dark mode, if requested.

Reorganise CSS to store the color palette into CSS variables
and reference these from another set of CSS variables that
are dynamically switched based on the prefers-color-scheme
media query.

Light mode variables stay they same as before,
but to ease color mixing, the current RGB values
have been transformed to HSL (using chrome devtools).
The current body background is now --sd-gray-extralight,
the current body color is now --sd-gray-extradark.
Other gray-variations, needed for dark-mode constrasts
are derived from these colors using HSL lightness shifting.

The systemd brand black color is used as dark mode background
and a matching extralight gray font color has been selected.

The link font-weight is reduced to 400 in dark mode,
as the green color on dark ground becomes to overwhelming
with a bold font.

The systemd logo color is dynamically swapped by using
the special fill value `currentColor` for dark/light-mode
depending parts – as per specification on brand.systemd.io
2022-05-17 23:00:18 +02:00

16 lines
321 B
HTML

<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
<header class="site-header">
<div class="wrapper">
<a class="page-logo" href="{{ site.baseurl }}/">
<svg width="202" height="26" viewBox="0 0 202 26">
<use href="/assets/systemd-logo.svg#systemd-logo"/>
</svg>
</a>
</div>
</header>