Disbaled dark mode in HTML Doxygen docs style

This commit is contained in:
Bartek Kryza 2023-06-24 17:23:27 +02:00
parent 6c6384e5fd
commit 627a9fe1a8
No known key found for this signature in database
GPG Key ID: 6CDA4566635E93B1
2 changed files with 49 additions and 10 deletions

View File

@ -6,7 +6,7 @@
[![Coverage](https://codecov.io/gh/bkryza/clang-uml/branch/master/graph/badge.svg)](https://codecov.io/gh/bkryza/clang-uml) [![Coverage](https://codecov.io/gh/bkryza/clang-uml/branch/master/graph/badge.svg)](https://codecov.io/gh/bkryza/clang-uml)
[![Version](https://img.shields.io/badge/version-0.3.7-blue)](https://github.com/bkryza/clang-uml/releases) [![Version](https://img.shields.io/badge/version-0.3.7-blue)](https://github.com/bkryza/clang-uml/releases)
[![Version](https://img.shields.io/badge/LLVM-12,13,14,15,16-orange)](https://github.com/bkryza/clang-uml/releases) [![Version](https://img.shields.io/badge/LLVM-12,13,14,15,16-orange)](https://github.com/bkryza/clang-uml/releases)
[![Doxygen](https://img.shields.io/badge/Docs-Doxygen-gainsboro)](https://clanguml-uml.github.io) [![Doxygen](https://img.shields.io/badge/Docs-Doxygen-gainsboro)](https://clang-uml.github.io)
`clang-uml` is an automatic C++ to UML class, sequence, package and include diagram generator, driven by `clang-uml` is an automatic C++ to UML class, sequence, package and include diagram generator, driven by
YAML configuration files. The main idea behind the YAML configuration files. The main idea behind the
@ -17,7 +17,7 @@ The diagrams can be generated in [PlantUML](https://plantuml.com) and JSON forma
`clang-uml` currently supports C++ up to version 17 with partial support for C++ 20. `clang-uml` currently supports C++ up to version 17 with partial support for C++ 20.
Full documentation can be found at [clanguml-uml.github.io](https://clanguml-uml.github.io). Full documentation can be found at [clang-uml.github.io](https://clang-uml.github.io).
To see what `clang-uml` can do, checkout the diagrams generated for unit To see what `clang-uml` can do, checkout the diagrams generated for unit
test cases [here](./docs/test_cases.md) or examples in test cases [here](./docs/test_cases.md) or examples in
@ -56,7 +56,7 @@ Main features supported so far include:
* **Include graph diagram generation** * **Include graph diagram generation**
* Show include graph for selected files - [_example_](docs/test_cases/t40001.md) * Show include graph for selected files - [_example_](docs/test_cases/t40001.md)
More comprehensive documentation can be at [clanguml-uml.github.io](https://clanguml-uml.github.io). More comprehensive documentation can be at [clang-uml.github.io](https://clang-uml.github.io).
## Installation ## Installation

View File

@ -28,6 +28,8 @@ SOFTWARE.
*/ */
html { html {
--color-scheme: light;
/* primary theme color. This will affect the entire websites color scheme: links, arrows, labels, ... */ /* primary theme color. This will affect the entire websites color scheme: links, arrows, labels, ... */
--primary-color: #1779c4; --primary-color: #1779c4;
--primary-dark-color: #335c80; --primary-dark-color: #335c80;
@ -172,16 +174,18 @@ html {
--webkit-scrollbar-color: var(--separator-color); --webkit-scrollbar-color: var(--separator-color);
} }
/*
@media screen and (max-width: 767px) { @media screen and (max-width: 767px) {
html { html {
--page-font-size: 16px; --page-font-size: 16px;
--navigation-font-size: 16px; --navigation-font-size: 16px;
--toc-font-size: 15px; --toc-font-size: 15px;
--code-font-size: 15px; /* affects code, fragment */ --code-font-size: 15px;
--title-font-size: 22px; --title-font-size: 22px;
} }
} }
*/
/*
@media (prefers-color-scheme: light) { @media (prefers-color-scheme: light) {
html:not(.light-mode) { html:not(.light-mode) {
color-scheme: light; color-scheme: light;
@ -242,8 +246,10 @@ html {
--fragment-linenumber-border: #1f1f1f; --fragment-linenumber-border: #1f1f1f;
} }
} }
*/
/* dark mode variables are defined twice, to support both the dark-mode without and with doxygen-awesome-darkmode-toggle.js */ /* dark mode variables are defined twice, to support both the dark-mode without and with doxygen-awesome-darkmode-toggle.js */
/*
html.dark-mode { html.dark-mode {
color-scheme: light; color-scheme: light;
@ -302,6 +308,7 @@ html.dark-mode {
--fragment-linenumber-background: #35393c; --fragment-linenumber-background: #35393c;
--fragment-linenumber-border: #1f1f1f; --fragment-linenumber-border: #1f1f1f;
} }
*/
body { body {
color: var(--page-foreground-color); color: var(--page-foreground-color);
@ -371,12 +378,14 @@ a.anchor {
border-bottom: none; border-bottom: none;
} }
@media screen and (max-width: 767px) { @media screen and (max-width: 767px) {
#titlearea { #titlearea {
padding-bottom: var(--spacing-small); padding-bottom: var(--spacing-small);
} }
} }
#titlearea table tbody tr { #titlearea table tbody tr {
height: auto !important; height: auto !important;
} }
@ -419,6 +428,7 @@ a.anchor {
background: var(--page-secondary-foreground-color); background: var(--page-secondary-foreground-color);
} }
@media screen and (max-width: 767px) { @media screen and (max-width: 767px) {
.sm-dox a span.sub-arrow { .sm-dox a span.sub-arrow {
background: var(--code-background); background: var(--code-background);
@ -434,6 +444,7 @@ a.anchor {
} }
} }
@media screen and (min-width: 768px) { @media screen and (min-width: 768px) {
.sm-dox li, .tablist li { .sm-dox li, .tablist li {
display: var(--menu-display); display: var(--menu-display);
@ -585,6 +596,7 @@ a.anchor {
right: var(--spacing-medium); right: var(--spacing-medium);
} }
@media screen and (max-width: 767px) { @media screen and (max-width: 767px) {
.tabs #MSearchBox { .tabs #MSearchBox {
position: relative; position: relative;
@ -594,6 +606,7 @@ a.anchor {
} }
} }
#MSearchSelectWindow, #MSearchResultsWindow { #MSearchSelectWindow, #MSearchResultsWindow {
z-index: 9999; z-index: 9999;
} }
@ -607,12 +620,14 @@ a.anchor {
margin-right: 0; margin-right: 0;
} }
@media screen and (max-width: 767px) { @media screen and (max-width: 767px) {
#main-menu > li:last-child { #main-menu > li:last-child {
height: 50px; height: 50px;
} }
} }
#MSearchField { #MSearchField {
font-size: var(--navigation-font-size); font-size: var(--navigation-font-size);
height: calc(var(--searchbar-height) - 2px); height: calc(var(--searchbar-height) - 2px);
@ -674,15 +689,19 @@ iframe {
color-scheme: normal; color-scheme: normal;
} }
/*
@media (prefers-color-scheme: dark) { @media (prefers-color-scheme: dark) {
html:not(.light-mode) iframe#MSearchResults { html:not(.light-mode) iframe#MSearchResults {
filter: invert() hue-rotate(180deg); filter: invert() hue-rotate(180deg);
} }
} }
*/
/*
html.dark-mode iframe#MSearchResults { html.dark-mode iframe#MSearchResults {
filter: invert() hue-rotate(180deg); filter: invert() hue-rotate(180deg);
} }
*/
#MSearchResults .SRPage { #MSearchResults .SRPage {
background-color: transparent; background-color: transparent;
@ -716,6 +735,7 @@ html.dark-mode iframe#MSearchResults {
color: var(--menu-focus-foreground) !important; color: var(--menu-focus-foreground) !important;
} }
/*
@media screen and (max-width: 767px) { @media screen and (max-width: 767px) {
#MSearchBox { #MSearchBox {
margin-top: var(--spacing-medium); margin-top: var(--spacing-medium);
@ -752,9 +772,6 @@ html.dark-mode iframe#MSearchResults {
width: auto !important; width: auto !important;
} }
/*
* Overwrites for fixing the searchbox on mobile in doxygen 1.9.2
*/
label.main-menu-btn ~ #searchBoxPos1 { label.main-menu-btn ~ #searchBoxPos1 {
top: 3px !important; top: 3px !important;
right: 6px !important; right: 6px !important;
@ -769,6 +786,7 @@ html.dark-mode iframe#MSearchResults {
float: left; float: left;
} }
} }
*/
/* /*
Tree view Tree view
@ -781,6 +799,7 @@ html.dark-mode iframe#MSearchResults {
max-width: 50vw; max-width: 50vw;
} }
/*
@media screen and (max-width: 767px) { @media screen and (max-width: 767px) {
#side-nav { #side-nav {
display: none; display: none;
@ -790,6 +809,7 @@ html.dark-mode iframe#MSearchResults {
margin-left: 0 !important; margin-left: 0 !important;
} }
} }
*/
#nav-tree { #nav-tree {
background: transparent; background: transparent;
@ -955,6 +975,7 @@ div.contents div.dyncontent {
margin: var(--spacing-medium) 0; margin: var(--spacing-medium) 0;
} }
/*
@media (prefers-color-scheme: dark) { @media (prefers-color-scheme: dark) {
html:not(.light-mode) div.contents div.dyncontent img, html:not(.light-mode) div.contents div.dyncontent img,
html:not(.light-mode) div.contents center img, html:not(.light-mode) div.contents center img,
@ -966,7 +987,9 @@ div.contents div.dyncontent {
filter: brightness(89%) hue-rotate(180deg) invert(); filter: brightness(89%) hue-rotate(180deg) invert();
} }
} }
*/
/*
html.dark-mode div.contents div.dyncontent img, html.dark-mode div.contents div.dyncontent img,
html.dark-mode div.contents center img, html.dark-mode div.contents center img,
html.dark-mode div.contents > table img, html.dark-mode div.contents > table img,
@ -977,6 +1000,7 @@ html.dark-mode div.contents .dotgraph iframe
{ {
filter: brightness(89%) hue-rotate(180deg) invert(); filter: brightness(89%) hue-rotate(180deg) invert();
} }
*/
h2.groupheader { h2.groupheader {
border-bottom: 0px; border-bottom: 0px;
@ -1131,7 +1155,7 @@ div.toc li a:hover, div.toc li a.active {
div.toc li a.aboveActive { div.toc li a.aboveActive {
color: var(--page-secondary-foreground-color) !important; color: var(--page-secondary-foreground-color) !important;
} }
/*
@media screen and (max-width: 999px) { @media screen and (max-width: 999px) {
div.contents .toc { div.contents .toc {
max-height: 45vh; max-height: 45vh;
@ -1195,6 +1219,7 @@ div.toc li a.aboveActive {
text-decoration: underline; text-decoration: underline;
} }
} }
*/
/* /*
Code & Fragments Code & Fragments
@ -1221,6 +1246,7 @@ div.fragment, pre.fragment {
overflow-x: auto; overflow-x: auto;
} }
/*
@media screen and (max-width: 767px) { @media screen and (max-width: 767px) {
div.fragment, pre.fragment { div.fragment, pre.fragment {
border-top-right-radius: 0; border-top-right-radius: 0;
@ -1266,6 +1292,7 @@ div.fragment, pre.fragment {
border-left: 0; border-left: 0;
} }
} }
*/
code, code a, pre.fragment, div.fragment, div.fragment .line, div.fragment span, div.fragment .line a, div.fragment .line span { code, code a, pre.fragment, div.fragment, div.fragment .line, div.fragment span, div.fragment .line a, div.fragment .line span {
font-family: var(--font-family-monospace); font-family: var(--font-family-monospace);
@ -1885,6 +1912,7 @@ div.dynheader img[src="closed.png"] {
font-size: var(--code-font-size); font-size: var(--code-font-size);
} }
@media screen and (max-width: 767px) { @media screen and (max-width: 767px) {
table.memberdecls .memItemLeft, table.memberdecls .memItemLeft,
@ -1990,6 +2018,7 @@ hr {
overflow: auto; overflow: auto;
} }
@media screen and (max-width: 767px) { @media screen and (max-width: 767px) {
.contents .dyncontent > .center, .contents > center { .contents .dyncontent > .center, .contents > center {
margin-left: calc(0px - var(--spacing-large)); margin-left: calc(0px - var(--spacing-large));
@ -1998,6 +2027,7 @@ hr {
} }
} }
/* /*
Directories Directories
*/ */
@ -2075,6 +2105,7 @@ table.directory tr.odd {
filter: saturate(0.2); filter: saturate(0.2);
} }
@media screen and (max-width: 767px) { @media screen and (max-width: 767px) {
div.directory { div.directory {
margin-left: calc(0px - var(--spacing-large)); margin-left: calc(0px - var(--spacing-large));
@ -2082,15 +2113,20 @@ table.directory tr.odd {
} }
} }
/*
@media (prefers-color-scheme: dark) { @media (prefers-color-scheme: dark) {
html:not(.light-mode) .iconfopen, html:not(.light-mode) .iconfclosed { html:not(.light-mode) .iconfopen, html:not(.light-mode) .iconfclosed {
filter: hue-rotate(180deg) invert(); filter: hue-rotate(180deg) invert();
} }
} }
*/
/*
html.dark-mode .iconfopen, html.dark-mode .iconfclosed { html.dark-mode .iconfopen, html.dark-mode .iconfclosed {
filter: hue-rotate(180deg) invert(); filter: hue-rotate(180deg) invert();
} }
*/
/* /*
Class list Class list
@ -2322,7 +2358,7 @@ div.contents .toc,
/* /*
Optional Dark mode toggle button Optional Dark mode toggle button
*/ */
/*
doxygen-awesome-dark-mode-toggle { doxygen-awesome-dark-mode-toggle {
display: inline-block; display: inline-block;
margin: 0 0 0 var(--spacing-small); margin: 0 0 0 var(--spacing-small);
@ -2358,6 +2394,7 @@ doxygen-awesome-dark-mode-toggle:hover {
html.dark-mode doxygen-awesome-dark-mode-toggle:hover { html.dark-mode doxygen-awesome-dark-mode-toggle:hover {
background-color: rgba(0,0,0,.18); background-color: rgba(0,0,0,.18);
} }
*/
/* /*
Optional fragment copy button Optional fragment copy button
@ -2408,6 +2445,7 @@ doxygen-awesome-fragment-copy-button.success {
border-color: rgb(14, 168, 14); border-color: rgb(14, 168, 14);
} }
/*
@media screen and (max-width: 767px) { @media screen and (max-width: 767px) {
.textblock > .doxygen-awesome-fragment-wrapper > doxygen-awesome-fragment-copy-button, .textblock > .doxygen-awesome-fragment-wrapper > doxygen-awesome-fragment-copy-button,
.textblock li > .doxygen-awesome-fragment-wrapper > doxygen-awesome-fragment-copy-button, .textblock li > .doxygen-awesome-fragment-wrapper > doxygen-awesome-fragment-copy-button,
@ -2417,6 +2455,7 @@ doxygen-awesome-fragment-copy-button.success {
right: 0; right: 0;
} }
} }
*/
/* /*
Optional paragraph link button Optional paragraph link button