Skip to content

Commit

Permalink
More dark mode tweaks
Browse files Browse the repository at this point in the history
Shifting from static SCSS variables to  dynamic CSS variables that respond when the mode changes
  • Loading branch information
hadley committed May 30, 2024
1 parent 0ad5dee commit b097669
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions inst/BS5/assets/pkgdown.scss
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ body {

// page header
.page-header {
border-bottom: 1px solid $border-color;
border-bottom: 1px solid var(--bs-border-color);
padding-bottom: 0.5rem;
margin-bottom: 0.5rem;
margin-top: 1.5rem;
Expand Down Expand Up @@ -277,7 +277,7 @@ h2, h3, h4, h5, h6, dt {

// Give targetted arguments some visual distinction
dt:target, dt:target + dd {
border-left: 0.25rem solid $primary;
border-left: 0.25rem solid var(--bs-primary);
margin-left: -0.75rem;
}
dt:target {
Expand Down Expand Up @@ -340,7 +340,7 @@ a[href='#main'] {
position: absolute;
margin: 4px;
padding: 0.75rem;
background-color: $body-bg;
background-color: var(--bs-body-bg);
text-decoration: none;
z-index: 2000;
}
Expand All @@ -365,7 +365,7 @@ a.footnote-ref {
.popover {
width: Min(100vw, 32rem);
font-size: 0.9rem;
box-shadow: 4px 4px 8px change-color($black, $alpha: 0.3);
box-shadow: 4px 4px 8px RGBA(var(--bs-body-color-rgb), 0.3);
}
.popover-body {
padding: 0.75rem;
Expand Down Expand Up @@ -430,8 +430,8 @@ pre, pre code {
}

[data-bs-theme="dark"] pre {
background-color: mix($body-bg-dark, $body-color-dark, 90%);
border-color: mix($body-bg-dark, $body-color-dark, 80%);
background-color: RGBA(var(--bs-body-color-rgb), 0.1);
border-color: var(--bs-border-color);
}

code {
Expand Down Expand Up @@ -481,7 +481,7 @@ pre div.gt-table {

code a:any-link {
color: inherit;
text-decoration-color: $gray-600;
text-decoration-color: RGBA(var(--bs-body-color-rgb), 0.6);
}

pre code {
Expand Down

0 comments on commit b097669

Please sign in to comment.