From 073b22ed6c9b8a5c9ec27f2e1fa990a049d0c788 Mon Sep 17 00:00:00 2001 From: Gregg Kellogg Date: Thu, 13 Mar 2025 16:13:52 -0700 Subject: [PATCH 1/3] Setup dark mode based on work in rdf-primer and elsewhere. --- spec/index.html | 50 ++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 49 insertions(+), 1 deletion(-) diff --git a/spec/index.html b/spec/index.html index 47aeeb9..cb8b117 100644 --- a/spec/index.html +++ b/spec/index.html @@ -3,6 +3,7 @@ RDF 1.2 Turtle + @@ -52,14 +53,51 @@ From ae0852be58f8232f77f7c3d3eeae3252c6be85c8 Mon Sep 17 00:00:00 2001 From: Gregg Kellogg Date: Fri, 14 Mar 2025 13:41:11 -0700 Subject: [PATCH 2/3] Remove hljs styling, which may eventually make it into ReSpec. --- spec/index.html | 32 -------------------------------- 1 file changed, 32 deletions(-) diff --git a/spec/index.html b/spec/index.html index cb8b117..46eaac1 100644 --- a/spec/index.html +++ b/spec/index.html @@ -56,38 +56,6 @@ body { color-scheme: light; } body.darkmode { color-scheme: dark; } - /* Copy of hljs light/dark values, since hljs uses media - * prefers-color-scheme rule which isn't controlled by color-scheme. */ - body .hljs { - --base: rgba(0, 0, 0, .03); /* Altered from hljs default of #fafafa; more like bikeshed/pygments */ - --mono-1: #383a42; - --mono-2: #686b77; - --mono-3: #717277; - --hue-1: #0b76c5; - --hue-2: #336ae3; - --hue-3: #a626a4; - --hue-4: #42803c; - --hue-5: #ca4706; - --hue-5-2: #c91243; - --hue-6: #986801; - --hue-6-2: #9a6a01; - } - body.darkmode .hljs { - --base: #282c34; - --base: rgba(255, 255, 255, .05); /* Altered from hljs default of #282c34; more like bikeshed/pygments */ - --mono-1: #abb2bf; - --mono-2: #818896; - --mono-3: #5c6370; - --hue-1: #56b6c2; - --hue-2: #61aeee; - --hue-3: #c678dd; - --hue-4: #98c379; - --hue-5: #e06c75; - --hue-5-2: #be5046; - --hue-6: #d19a66; - --hue-6-2: #e6c07b; - } - /* Style Turtle script blocks to be visable */ pre.example script { display:block; From ad2c29d051f71b2c9a3137161ac3c57e36dc1f63 Mon Sep 17 00:00:00 2001 From: Gregg Kellogg Date: Fri, 14 Mar 2025 13:58:50 -0700 Subject: [PATCH 3/3] Simplify table styling. --- spec/index.html | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/spec/index.html b/spec/index.html index 46eaac1..1d1389f 100644 --- a/spec/index.html +++ b/spec/index.html @@ -60,12 +60,10 @@ pre.example script { display:block; } - /* .separated { border-collapse:collapse; } - .separated thead tr th { border:1px solid black; padding: .2em; min-width: 10vw } - .separated tbody tr td { border:1px solid black; text-align: center; min-width: 10vw } + .separated thead tr th { border:1px solid; padding: .2em; min-width: 10vw } + .separated tbody tr td { border:1px solid; text-align: center; min-width: 10vw } .separated tbody tr td.r { text-align: right; padding: .5em; } - */ .grammar td { font-family: monospace; vertical-align: top; } .grammar-opt, .grammar-alt, @@ -96,8 +94,8 @@ .separated tbody tr td:nth-child(3) {padding: 3px 2px;} .separated tbody tr td { border:1px solid black; text-align: center; min-width: 10vw } - body.darkmode .separated thead tr th { border:1px solid white; } - body.darkmode .separated tbody tr td { border:1px solid white; } + /*body.darkmode .separated thead tr th { border:1px solid white; } + body.darkmode .separated tbody tr td { border:1px solid white; }*/ table { word-break: normal; overflow-wrap: anywhere; } table.ex, .ex th, .ex td { border: none; padding: 0; } @@ -107,16 +105,12 @@ .ex th { text-align: center; } table.cp-definitions { border-collapse:collapse; background-color: #DDDDFF} + body.darkmode table.cp-definitions { background-color: black} table.cp-definitions, table.cp-definitions th, - table.cp-definitions td { border:1px solid black; padding:0.2em; } + table.cp-definitions td { border:1px solid; padding:0.2em; } table.cp-definitions td:nth-child(2) { text-align: center; } - - body.darkmode table.cp-definitions { background-color: black} - body.darkmode table.cp-definitions, - body.darkmode table.cp-definitions th, - body.darkmode table.cp-definitions td { border:1px solid white; }