From b4bc6b1c2148e9c67d24fac2ab7ebfae54835ab2 Mon Sep 17 00:00:00 2001 From: Dimitri Baptiste <55843498+ddbaptiste@users.noreply.github.com> Date: Thu, 22 Jan 2026 13:20:59 -0500 Subject: [PATCH 1/4] update styling defaults --- custom-dark.scss | 26 ++++++++++++++++++ custom.scss | 70 ++++++++++++++++++++++++++++++++---------------- 2 files changed, 73 insertions(+), 23 deletions(-) create mode 100644 custom-dark.scss diff --git a/custom-dark.scss b/custom-dark.scss new file mode 100644 index 0000000..dd57457 --- /dev/null +++ b/custom-dark.scss @@ -0,0 +1,26 @@ +/*-- scss:defaults --*/ +$gray-800: #444 !default; +$gray-900: #222 !default; +$white: #fff !default; + +$body-bg: $gray-900 !default; +$body-color: $white !default; + +// code +$code-color: $gray-800 !default; +$pre-color: inherit !default; + +/*-- scss:rules --*/ + +@include color-mode(dark) {} + +// source code +pre.sourceCode { + background-color: #444; +} + +.code-copy-button:hover { + & .bi::before { + background-image: url('data:image/svg+xml,') !important; + } +} diff --git a/custom.scss b/custom.scss index 0c97b9d..0f19118 100644 --- a/custom.scss +++ b/custom.scss @@ -1,13 +1,10 @@ -/*-- scss:uses --*/ - -/*-- scss:functions --*/ - /*-- scss:defaults --*/ // fonts -$font-family-sans-serif: "Helvetica", "Red Hat Display", sans-serif !default; +$font-size-root: null !default; +$font-size-base: 1rem !default; +$font-family-sans-serif: system-ui, -apple-system, "Helvetica", "Red Hat Display", sans-serif !default; $font-family-monospace: "Courier New", "Consolas", monospace !default; - $headings-font-weight: 500 !default; // colors @@ -23,12 +20,11 @@ $primary: $syndemics-blue !default; $secondary: $syndemics-cyan !default; $light: $background-light !default; $dark: $background-dark !default; +$link-color: $syndemics-pink !default; // options $enable-rounded: true !default; -/*-- scss:mixins --*/ - /*-- scss:rules --*/ :root { @@ -37,24 +33,34 @@ $enable-rounded: true !default; } body.quarto-light { - --bs-link-hover-color-rgb: #{colorToRGBA(#3d9be9)}; - h1,.h1,h2,.h2 { + --bs-heading-color: var(--bs-heading-color-light); + + h1, .h1, h2, .h2 { color: var(--bs-heading-color-light); } } body.quarto-dark { - --bs-link-color-rgb: #{colorToRGBA(#f0325f)}; - --bs-link-hover-color-rgb: #{colorToRGBA(#3d9be9)}; - h1,.h1,h2,.h2 { + --bs-heading-color: var(--bs-heading-color-dark); + + h1, .h1, h2, .h2 { color: var(--bs-heading-color-dark); } } -h1.title,.title.h1 { +h1.title, .title.h1 { font-size: calc(1.5rem + 0.9vw); } +// color toggle icon +.quarto-color-scheme-toggle { + position: fixed; + + .bi::before, .alternate .bi::before { + transition: background-image 0.5s; + } +} + #TOC { font-weight: 600; @@ -69,10 +75,13 @@ h1.title,.title.h1 { } } + .nav-link { + transition: unset; + } + .nav-link:not(:hover) { color: inherit !important; border-left: solid 1px var(--bs-body-color); - transition: color 0.5s; } .nav-link:hover { @@ -85,15 +94,9 @@ h1.title,.title.h1 { font-weight: 600 !important; } +// table style .table { - & > tbody { - border: 2px solid; - } - - & col:not(:last-of-type) { - border-right: 2px solid; - } - + // heading & tr:first-of-type { background-color: var(--bs-heading-color-dark); font-weight: 600; @@ -104,8 +107,29 @@ h1.title,.title.h1 { color: black; } } + + // table rules + & > tbody { + border: 2px solid; + } + + & col:not(:last-of-type) { + border-right: 2px solid; + } + + & > caption { + font-weight: 600; + color: var(--bs-heading-color); + } +} + +figcaption { + font-weight: 600; + color: var(--bs-heading-color); + text-align: center; } +// source code style pre code { font-weight: 600; } From acd8c9e06eb822e7139beca072f4b2182d4e6c7e Mon Sep 17 00:00:00 2001 From: Dimitri Baptiste <55843498+ddbaptiste@users.noreply.github.com> Date: Thu, 22 Jan 2026 13:22:47 -0500 Subject: [PATCH 2/4] update quarto defaults to use new styling --- .gitignore | 4 +++- _quarto.yml | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index e62f227..6454b86 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,6 @@ # Keeping Knit html files out *.html - # Keeping Data out of the Repo data/raw/* !data/raw/.gitkeep @@ -63,3 +62,6 @@ rsconnect/ /.quarto/ **/*.quarto_ipynb + +# ignore .editorconfig +/.editorconfig \ No newline at end of file diff --git a/_quarto.yml b/_quarto.yml index d55e40a..00c0c5a 100644 --- a/_quarto.yml +++ b/_quarto.yml @@ -14,9 +14,9 @@ format: theme: light: - ./custom.scss - dark: - - darkly + dark: - ./custom.scss + - ./custom-dark.scss pdf: margin-left: 20mm margin-top: 30mm From 46fc53a66b4b8e9a7141930cf6b2588949bd4a6f Mon Sep 17 00:00:00 2001 From: Dimitri Baptiste <55843498+ddbaptiste@users.noreply.github.com> Date: Thu, 22 Jan 2026 13:26:46 -0500 Subject: [PATCH 3/4] fix formatting of dark theme heading in `_quarto.yml` --- _quarto.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_quarto.yml b/_quarto.yml index 00c0c5a..0900636 100644 --- a/_quarto.yml +++ b/_quarto.yml @@ -14,7 +14,7 @@ format: theme: light: - ./custom.scss - dark: + dark: - ./custom.scss - ./custom-dark.scss pdf: From f602cdee4c0901f2d77af53d4cc39858c10cd865 Mon Sep 17 00:00:00 2001 From: Dimitri Baptiste <55843498+ddbaptiste@users.noreply.github.com> Date: Thu, 22 Jan 2026 13:57:41 -0500 Subject: [PATCH 4/4] fix overflow rendering --- custom.scss | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/custom.scss b/custom.scss index 0f19118..77a6e1e 100644 --- a/custom.scss +++ b/custom.scss @@ -137,7 +137,8 @@ pre code { pre:not(.sourceCode) { border: 1px #ccc solid; border-radius: 5px; - overflow: visible; + overflow-x: clip; + overflow-y: visible; &:before { position: relative;