/* Night colours for olewave.com, from docs/day_night_plan.md. Every rule here applies under html[data-theme="dark"] only, so the day theme is untouched. The head script in layout1 and layout2 sets the attribute before the first paint, and the header's button switches it. The tokens hold the palette. The rules after them reach the colours the theme's style.css and overrides.css write by hand, about 1,300 of them, since neither file is rewritten. Contrast is measured against the surface each text sits on, 4.5:1 for text and 3:1 for large text. */ :root { color-scheme: light; } :root[data-theme="dark"] { color-scheme: dark; --olw-bg: #121214; /* the page */ --olw-bg-2: #1b1b1f; /* cards, the header bar, menus */ --olw-bg-3: #232328; /* chips, stripes, hover */ --olw-rule: #2e2e34; --olw-ink: #f2f2f2; /* headings, 16.5:1 on the page */ --olw-text: #e2e2e2; /* reading text, 14.6:1 */ --olw-text-2: #a3a3a3; /* labels and dates, 7.2:1 */ --olw-link: #9b85ff; /* the purple, lifted for text on dark, 6.1:1 */ } /* The page */ [data-theme="dark"] body, [data-theme="dark"] .page-wraper, [data-theme="dark"] .page-content, [data-theme="dark"] .bg-white { background-color: var(--olw-bg) !important; color: var(--olw-text); } [data-theme="dark"] body { background-image: none; } [data-theme="dark"] #loading-area { background-color: var(--olw-bg); } [data-theme="dark"] h1, [data-theme="dark"] h2, [data-theme="dark"] h3, [data-theme="dark"] h4, [data-theme="dark"] h5, [data-theme="dark"] h6 { color: var(--olw-ink); } [data-theme="dark"] hr { border-color: var(--olw-rule); } /* The theme sets bold text to black. At night it takes its paragraph's colour, and an inline colour on it still wins. */ [data-theme="dark"] .page-content strong, [data-theme="dark"] .page-content b { color: inherit; } /* The header bar, its menus and the language picker */ [data-theme="dark"] .site-header .main-bar, [data-theme="dark"] .is-fixed .main-bar { background: var(--olw-bg); } [data-theme="dark"] .is-fixed .main-bar { background: rgba(18, 18, 20, 0.92); box-shadow: 0 1px 0 var(--olw-rule); } [data-theme="dark"] .header-nav .nav > li > a { color: var(--olw-ink); } [data-theme="dark"] .header-nav .nav > li > a:hover, [data-theme="dark"] .header-nav .nav > li > a:focus, [data-theme="dark"] .header-nav .nav > li.open > a, [data-theme="dark"] .header-nav .nav > li:hover > a { color: var(--olw-link) !important; } [data-theme="dark"] .header-nav .nav > li .sub-menu { background: var(--olw-bg-2); box-shadow: 0 12px 32px rgba(0, 0, 0, .5); } [data-theme="dark"] .header-nav .nav > li .sub-menu li a { color: var(--olw-text); } [data-theme="dark"] .header-nav .nav > li .sub-menu li a:hover { color: var(--olw-link); } [data-theme="dark"] .olw-lang-btn { color: var(--olw-ink); border-color: var(--olw-rule); } [data-theme="dark"] .olw-lang-btn:hover, [data-theme="dark"] .olw-lang-btn[aria-expanded="true"] { color: var(--olw-link); border-color: var(--olw-link); } [data-theme="dark"] .olw-theme__btn { color: var(--olw-ink); border-color: var(--olw-rule); } [data-theme="dark"] .olw-theme__btn:hover, [data-theme="dark"] .olw-theme__btn:focus-visible, [data-theme="dark"] .olw-theme__btn[aria-expanded="true"] { color: var(--olw-link); border-color: var(--olw-link); } [data-theme="dark"] .olw-theme__menu { background: var(--olw-bg-2); border-color: var(--olw-rule); box-shadow: 0 12px 32px rgba(0, 0, 0, .5); } [data-theme="dark"] .olw-theme__menu button { color: var(--olw-text); } [data-theme="dark"] .olw-theme__menu button:hover, [data-theme="dark"] .olw-theme__menu button:focus-visible { background: var(--olw-bg-3); } [data-theme="dark"] .olw-theme__menu button[aria-pressed="true"] { background: #5f3bff; color: #ffffff; } [data-theme="dark"] .olw-lang-menu { background: var(--olw-bg-2); border-color: var(--olw-rule); box-shadow: 0 12px 32px rgba(0, 0, 0, .5); } [data-theme="dark"] .olw-lang-menu li { color: var(--olw-text); } [data-theme="dark"] .olw-lang-menu li:hover { background: var(--olw-bg-3); } [data-theme="dark"] .olw-lang-menu li[aria-selected="true"] { background: #5f3bff; color: #ffffff; } [data-theme="dark"] .navbar-toggler span { background: var(--olw-ink); } /* The swirl's day mark has white lines between its arms, which read as a white disc on the night page. The night mark has them clear. */ [data-theme="dark"] .site-header .logo-header a.olw-brand img.olw-brand__mark { display: none; } [data-theme="dark"] .site-header .logo-header a.olw-brand img.olw-brand__mark--night { display: block; } /* The CMS content's inline text colours, written by hand in the editor across the pages and posts, some of it rendered outside .page-content. Each keeps its hue at night and reaches 4.5:1 on the page. overrides.css darkens some of them for the day theme with the same attribute selectors, and these come later. */ [data-theme="dark"] [style*="color:#0A0A0A" i]:not([style*="background-color:#0A0A0A" i]), [data-theme="dark"] [style*="color: #0A0A0A" i]:not([style*="background-color: #0A0A0A" i]), [data-theme="dark"] [style*="color:#1a1a1a" i]:not([style*="background-color:#1a1a1a" i]), [data-theme="dark"] [style*="color: #1a1a1a" i]:not([style*="background-color: #1a1a1a" i]), [data-theme="dark"] [style*="color:#000000" i]:not([style*="background-color:#000000" i]), [data-theme="dark"] [style*="color: #000000" i]:not([style*="background-color: #000000" i]), [data-theme="dark"] [style*="color:#000" i]:not([style*="background-color:#000" i]), [data-theme="dark"] [style*="color: #000" i]:not([style*="background-color: #000" i]) { color: var(--olw-ink) !important; } [data-theme="dark"] [style*="color:#525252" i]:not([style*="background-color:#525252" i]), [data-theme="dark"] [style*="color: #525252" i]:not([style*="background-color: #525252" i]), [data-theme="dark"] [style*="color:#8A8A8A" i]:not([style*="background-color:#8A8A8A" i]), [data-theme="dark"] [style*="color: #8A8A8A" i]:not([style*="background-color: #8A8A8A" i]) { color: var(--olw-text-2) !important; } [data-theme="dark"] [style*="color:#9b59b6" i]:not([style*="background-color:#9b59b6" i]), [data-theme="dark"] [style*="color: #9b59b6" i]:not([style*="background-color: #9b59b6" i]) { color: #c39bd8 !important; } [data-theme="dark"] [style*="color:#e74c3c" i]:not([style*="background-color:#e74c3c" i]), [data-theme="dark"] [style*="color: #e74c3c" i]:not([style*="background-color: #e74c3c" i]), [data-theme="dark"] [style*="color:#c0392b" i]:not([style*="background-color:#c0392b" i]), [data-theme="dark"] [style*="color: #c0392b" i]:not([style*="background-color: #c0392b" i]) { color: #ff8576 !important; } [data-theme="dark"] [style*="color:#f39c12" i]:not([style*="background-color:#f39c12" i]), [data-theme="dark"] [style*="color: #f39c12" i]:not([style*="background-color: #f39c12" i]) { color: #f5b041 !important; } [data-theme="dark"] [style*="color:#16a085" i]:not([style*="background-color:#16a085" i]), [data-theme="dark"] [style*="color: #16a085" i]:not([style*="background-color: #16a085" i]) { color: #3ccfae !important; } [data-theme="dark"] [style*="color:#1E7FE3" i]:not([style*="background-color:#1E7FE3" i]), [data-theme="dark"] [style*="color: #1E7FE3" i]:not([style*="background-color: #1E7FE3" i]), [data-theme="dark"] [style*="color:#2980b9" i]:not([style*="background-color:#2980b9" i]), [data-theme="dark"] [style*="color: #2980b9" i]:not([style*="background-color: #2980b9" i]) { color: #6eaaf2 !important; } [data-theme="dark"] [style*="color:#2ecc71" i]:not([style*="background-color:#2ecc71" i]), [data-theme="dark"] [style*="color: #2ecc71" i]:not([style*="background-color: #2ecc71" i]) { color: #5ee08e !important; } /* Home. The feature boxes, the customer voices and their slider, whose rules live in the home page's own