Skip to content

Commit

Permalink
theme - export as CSS variable right where they are defined
Browse files Browse the repository at this point in the history
  • Loading branch information
cderv committed Sep 5, 2024
1 parent 48f1b2a commit 4bd31bc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/resources/formats/html/_quarto-rules.scss
Original file line number Diff line number Diff line change
Expand Up @@ -588,12 +588,6 @@ div.ansi-escaped-output {
--quarto-border-color: #{$table-border-color};
--quarto-border-width: #{$border-width};
--quarto-border-radius: #{$border-radius};
@if $code-block-bg {
--quarto-code-block-bg-color: #{$code-block-bg-color};
}
@if variable-exists(code-block-color) {
--quarto-code-block-color: #{$code-block-color};
}
}

/* rules to support GT table styling */
Expand Down
8 changes: 8 additions & 0 deletions src/resources/formats/html/bootstrap/_bootstrap-rules.scss
Original file line number Diff line number Diff line change
Expand Up @@ -762,6 +762,10 @@ $code-block-bg-color: quarto-color.adjust(
) !default;
@if type_of($code-block-bg) == color {
$code-block-bg-color: $code-block-bg;
// export as CSS variable
:root {
--quarto-code-block-bg-color: #{$code-block-bg-color};
}
}

// stack layout panels on mobile devices
Expand Down Expand Up @@ -851,6 +855,10 @@ div.sourceCode {
div.sourceCode pre.sourceCode {
color: $code-block-color;
}
// export this one as a CSS variable
:root {
--quarto-code-block-color: #{$code-block-color};
}
}

pre.sourceCode {
Expand Down

0 comments on commit 4bd31bc

Please sign in to comment.