/* ==UserStyle== @name Dark Qt documentation + non-fixed navbar @namespace github.com/Calinou @version 1.0.0 @description Dark theme for the Qt developer documentation. Also makes the navigation bar non-fixed to increase the available screen real estate. @author Calinou (https://github.com/Calinou) @license CC0-1.0 @homepageURL https://github.com/Calinou/usercss-qt-dark @supportURL https://github.com/Calinou/usercss-qt-dark/issues ==/UserStyle== */ @-moz-document domain("doc.qt.io") { :root { --text-color: hsla(0, 0%, 100%, 0.88); --text-color-muted: hsla(0, 0%, 100%, 0.6); --background-color-1: #22262a; --background-color-2: #2f3337; } html { /* Avoid bright flashes while loading the page. */ background-color: var(--background-color-1); } body { background-color: var(--background-color-1); color: var(--text-color); } a { color: hsla(120, 50%, 60%); /* Disable the default transition as it feels less snappy. */ transition: none; } a:hover, a:focus { color: hsla(120, 50%, 80%); } a:active { color: hsla(120, 50%, 45%); } table, table td, table th { border-color: hsla(0, 0%, 100%, 0.2); } table .odd { background-color: hsla(0, 0%, 100%, 0.125); } input { background-color: var(--background-color-1); border: 2px solid transparent; } input, input:focus { color: var(--text-color); } .context, .toc, .sectionlist { background-color: var(--background-color-2); } .mainContent p, .toc h3 a, .context ul > li, .doc-column ul > li, .navigationbar li { color: var(--text-color); } .navigationbar li a, .navigationbar ul:last-of-type li a, .navigationbar li::after, .context h3.fn, .context h3.flags { color: var(--text-color-muted); } /* Google Custom Search bar */ #gsc-i-id1 { background-color: var(--background-color-2) !important; /* Hide border while avoiding reflows. */ border: 1px solid transparent !important; } /* Homepage */ div.main_index .row { border-bottom-color: var(--background-color-1); } div.main_index .row::after { background-color: var(--background-color-1); } .main_index { background-color: var(--background-color-2); } #footer-promo { background-color: var(--background-color-1) !important; } /* Qt for Python documentation */ .body, .sphinxsidebar { background-color: var(--background-color-2); } .bodywrapper p, .sphinxsidebar h3 a, span.pre { color: var(--text-color); } div.note { background-color: hsla(0, 0%, 100%, 0.125); } div.warning { background-color: hsla(50, 100%, 50%, 0.125); } /* Navigation bar */ #navbar { /* Disable fixed navbar as it decreases the available screen real estate. */ position: static; background-color: var(--background-color-2); } #navbar.fixed { /* Makes scrolling down a bit easier by avoiding reflows. */ /* We don't care about the navbar transition anymore since it's no longer fixed. */ height: 70px; } #mm-wrap { background-color: transparent; } #mm-wrap #mm-helper > li.mm-item > a.mm-link { color: var(--text-color); } #navbar #mm-wrap #mm-helper li.mm-item { border-color: hsla(0, 0%, 100%, 20%); } /* Make the "user account" icon visible */ li.mm-item:nth-child(3) > a:nth-child(1) { filter: invert(100%); } }