Skip to content

Commit

Permalink
Merge pull request #11281 from quarto-dev/bugfix/issue-11254
Browse files Browse the repository at this point in the history
forward link variables to SCSS
  • Loading branch information
cscheid authored Nov 1, 2024
2 parents bf1664b + fdbe180 commit 4ef4ab8
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 1 deletion.
9 changes: 9 additions & 0 deletions src/core/sass/brand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,7 @@ const brandTypographyBundle = (
"style",
"color",
"background-color",
"decoration",
]
) {
// deno-lint-ignore no-explicit-any
Expand Down Expand Up @@ -447,6 +448,13 @@ const brandTypographyBundle = (
["color", "presentation-heading-color"],
// TODO: style, needs CSS change
],
"link": [
// bootstrap + revealjs
["color", "link-color"],
["background-color", "link-color-bg"],
["weight", "link-weight"],
["decoration", "link-decoration"],
],
"monospace": [
// bootstrap + revealjs
["family", "font-family-monospace"],
Expand Down Expand Up @@ -497,6 +505,7 @@ const brandTypographyBundle = (
for (
const kind of [
// more specific entries go first
"link",
"monospace-block",
"monospace-inline",
"monospace",
Expand Down
7 changes: 7 additions & 0 deletions src/resources/formats/html/bootstrap/_bootstrap-rules.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2174,3 +2174,10 @@ code {
@include font-size($code-inline-font-size);
font-weight: $font-weight-monospace-inline;
}

// link styling
a {
background-color: $link-color-bg;
font-weight: $link-weight;
text-decoration: $link-decoration;
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ $link-color: if(
theme-override-value($theme-name, "link-color", $link-color),
$link-color
);
$link-color-bg: transparent !default;

/* Code Block Formatting */
// Code Block Border Treatment
Expand Down Expand Up @@ -255,7 +256,8 @@ $h1h2h3-font-weight: 600 !default;
$font-weight-base: 400 !default;
$small-font-size: 0.875em !default;
$code-font-size: $small-font-size !default;
$font-family-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace !default;
$font-family-monospace: SFMono-Regular, Menlo, Monaco, Consolas,
"Liberation Mono", "Courier New", monospace !default;

$font-family-monospace-block: $font-family-monospace !default;
$font-family-monospace-inline: $font-family-monospace !default;
Expand All @@ -264,3 +266,5 @@ $font-weight-monospace-block: $font-weight-monospace !default;
$font-weight-monospace-inline: $font-weight-monospace !default;
$code-block-font-size: $code-font-size !default;
$code-inline-font-size: $code-font-size !default;
$link-weight: $font-weight-base !default;
$link-decoration: inherit !default;
11 changes: 11 additions & 0 deletions src/resources/formats/revealjs/quarto.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ $font-weight-base: 400 !default;
$code-font-size: $presentation-font-size-root !default;
$font-family-monospace-block: $font-family-monospace !default;
$font-family-monospace-inline: $font-family-monospace !default;
$link-weight: $font-weight-base !default;
$link-color-bg: transparent !default;
$link-decoration: inherit !default;

// main colors
$body-bg: #fff !default;
Expand Down Expand Up @@ -923,3 +926,11 @@ kbd {
--r-inline-code-font-size: #{$revealjs-code-inline-font-size};
--r-block-code-font-size: #{$revealjs-code-block-font-size};
}

// _brand.yml rules

.reveal a {
font-weight: $link-weight;
background-color: $link-color-bg;
text-decoration: $link-decoration;
}

0 comments on commit 4ef4ab8

Please sign in to comment.