From 8e03db018ff8e84c3fbc2d9f27382c6fa67d36d2 Mon Sep 17 00:00:00 2001 From: Jason Fox Date: Sun, 22 May 2022 16:12:30 +0200 Subject: [PATCH 001/304] Adding Dark mode. - add 5.2.0-beta1 JS and deploy-preview CSS - remove conflicting defaults - add dark mode toggle - amend CSS --- Customization/xsl/nav.xsl | 10 ++++- Customization/xsl/utility-classes.xsl | 4 +- css/collapsible-toc.css | 31 ++++--------- css/common-bootstrap.css | 35 ++++++++++++++- includes/bootstrap.hdf.xml | 10 ++++- includes/bs-navbar-default.hdr.xml | 38 ++++++++++++++++ insertParameters.xml | 5 +++ plugin.xml | 8 ++++ xsl/html5-bootstrap.xsl | 64 +++++++++++++++++++++++++++ 9 files changed, 177 insertions(+), 28 deletions(-) diff --git a/Customization/xsl/nav.xsl b/Customization/xsl/nav.xsl index bba4a6c7..411a3cc3 100644 --- a/Customization/xsl/nav.xsl +++ b/Customization/xsl/nav.xsl @@ -581,6 +581,9 @@ + + + @@ -591,7 +594,7 @@ link-primary d-inline-flex align-items-center flex-shrink-1 - ps-0 + ps-1 ps-3 @@ -619,10 +622,13 @@ + + + - link-primary d-inline-flex align-items-center flex-shrink-1 ps0 + link-primary d-inline-flex align-items-center flex-shrink-1 ps-2 active diff --git a/Customization/xsl/utility-classes.xsl b/Customization/xsl/utility-classes.xsl index c1697734..5251f980 100644 --- a/Customization/xsl/utility-classes.xsl +++ b/Customization/xsl/utility-classes.xsl @@ -12,8 +12,8 @@ > - - + + diff --git a/css/collapsible-toc.css b/css/collapsible-toc.css index c267d49a..39e23467 100644 --- a/css/collapsible-toc.css +++ b/css/collapsible-toc.css @@ -6,9 +6,11 @@ /*! These values define the relative width of the * main content window compared with the sidebar-nav */ + .bd-links { overflow: auto; font-weight: 600; + padding-left: none; } @media (min-width: 768px) { @@ -35,7 +37,7 @@ .bd-links a { padding: 0.1875rem 0.5rem; margin-top: 0.125rem; - color: rgba(0, 0, 0, 0.65); + color: rgba(var(--bs-body-color-rgb),.75) !important; text-decoration: none; } @@ -55,31 +57,16 @@ box-shadow: none; } -.bd-links span { - color: rgba(0, 0, 0, 0.65); -} - -.bd-links .btn::before { - width: 1.25em; - line-height: 0; - content: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='rgba%280,0,0,.5%29' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M5 14l6-6-6-6'/%3e%3c/svg%3e"); - transition: transform 0.35s ease; - transform-origin: 0.5em 50%; -} - -.bd-links .btn:hover::before { - content: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='rgba%280,0,0,.95%29' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M5 14l6-6-6-6'/%3e%3c/svg%3e"); -} - -.bd-links .btn[aria-expanded='true'] { - color: rgba(0, 0, 0, 0.85); +.bd-links svg { + color: rgba(var(--bs-body-color-rgb),.75); } -.bd-links .btn[aria-expanded='true']::before { +.bd-links .btn[aria-expanded='true'] svg { transform: rotate(90deg); } -.bd-links .active { +.bd-links .active + { font-weight: 600; - color: rgba(0, 0, 0, 0.85); + color: var(--bs-body-color); } diff --git a/css/common-bootstrap.css b/css/common-bootstrap.css index 28db1dd0..d7ed1b3b 100644 --- a/css/common-bootstrap.css +++ b/css/common-bootstrap.css @@ -3,6 +3,39 @@ * See the accompanying LICENSE file for applicable licenses. */ +:root { + --dita-prussian-blue: #1d365d; + --dita-violet: #663399; +} + +[data-theme="dark"] { + --dita-prussian-blue: #abc1e4; + --dita-violet: #9774cc; +} + +@media (prefers-color-scheme: dark) { + :root { + --dita-prussian-blue: #abc1e4; + --dita-violet: #9774cc; + } + + [data-theme="light"] { + --dita-prussian-blue: #1d365d; + --dita-violet: #663399; + } +} + +.numcharref, +.parameterentity, +.textentity, +.xmlatt, +.xmlelement, +.xmlnsname, +.xmlpi { + color: var( --dita-violet); + font-family: var( --bs-font-monospace) +} + .cmdname, .codeph, .filepath, @@ -14,7 +47,7 @@ .cmdname, .parmname { - color: #1d365d; + color: var(--dita-prussian-blue); font-weight: bold; } diff --git a/includes/bootstrap.hdf.xml b/includes/bootstrap.hdf.xml index 7c7fb618..cbcdd65d 100644 --- a/includes/bootstrap.hdf.xml +++ b/includes/bootstrap.hdf.xml @@ -1,5 +1,5 @@
- + + + + + + + + + From f50ff89b8cc8c2e9660c0725e8a13e2f42eb654a Mon Sep 17 00:00:00 2001 From: Jason Fox Date: Sun, 22 May 2022 16:28:09 +0200 Subject: [PATCH 002/304] Formatting --- Customization/xsl/nav.xsl | 34 +++++++---- css/collapsible-toc.css | 7 +-- css/common-bootstrap.css | 10 ++-- includes/bootstrap.hdf.xml | 3 +- includes/bs-navbar-default.hdr.xml | 94 +++++++++++++++++++++++++----- 5 files changed, 113 insertions(+), 35 deletions(-) diff --git a/Customization/xsl/nav.xsl b/Customization/xsl/nav.xsl index 411a3cc3..cb04bb41 100644 --- a/Customization/xsl/nav.xsl +++ b/Customization/xsl/nav.xsl @@ -361,7 +361,9 @@ - + @@ -493,7 +495,9 @@ - + @@ -538,11 +542,7 @@ priority="10" > - + @@ -582,7 +582,14 @@ - + @@ -609,7 +616,7 @@ -
+
diff --git a/css/collapsible-toc.css b/css/collapsible-toc.css index 39e23467..62f824ad 100644 --- a/css/collapsible-toc.css +++ b/css/collapsible-toc.css @@ -37,7 +37,7 @@ .bd-links a { padding: 0.1875rem 0.5rem; margin-top: 0.125rem; - color: rgba(var(--bs-body-color-rgb),.75) !important; + color: rgba(var(--bs-body-color-rgb), 0.75) !important; text-decoration: none; } @@ -58,15 +58,14 @@ } .bd-links svg { - color: rgba(var(--bs-body-color-rgb),.75); + color: rgba(var(--bs-body-color-rgb), 0.75); } .bd-links .btn[aria-expanded='true'] svg { transform: rotate(90deg); } -.bd-links .active - { +.bd-links .active { font-weight: 600; color: var(--bs-body-color); } diff --git a/css/common-bootstrap.css b/css/common-bootstrap.css index d7ed1b3b..f00f4d15 100644 --- a/css/common-bootstrap.css +++ b/css/common-bootstrap.css @@ -8,7 +8,7 @@ --dita-violet: #663399; } -[data-theme="dark"] { +[data-theme='dark'] { --dita-prussian-blue: #abc1e4; --dita-violet: #9774cc; } @@ -19,7 +19,7 @@ --dita-violet: #9774cc; } - [data-theme="light"] { + [data-theme='light'] { --dita-prussian-blue: #1d365d; --dita-violet: #663399; } @@ -31,9 +31,9 @@ .xmlatt, .xmlelement, .xmlnsname, -.xmlpi { - color: var( --dita-violet); - font-family: var( --bs-font-monospace) +.xmlpi { + color: var(--dita-violet); + font-family: var(--bs-font-monospace); } .cmdname, diff --git a/includes/bootstrap.hdf.xml b/includes/bootstrap.hdf.xml index cbcdd65d..8b1fe7cf 100644 --- a/includes/bootstrap.hdf.xml +++ b/includes/bootstrap.hdf.xml @@ -17,5 +17,6 @@ + +