Skip to content

Commit

Permalink
Merge pull request #10796 from quarto-dev/bugfix/issue-10608
Browse files Browse the repository at this point in the history
css - don't define functions that override existing css functions
  • Loading branch information
cscheid authored Sep 13, 2024
2 parents ae3570f + 69d5040 commit 81b2732
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions news/changelog-1.6.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ All changes included in 1.6:

## Other Fixes and Improvements

- ([#10608](https://github.com/quarto-dev/quarto-cli/issues/10608)): Don't overwrite the built-in CSS function `contrast` in Quarto's SCSS.
- ([#10162](https://github.com/quarto-dev/quarto-cli/issues/10162)): Use Edge on `macOS` as a Chromium browser when available.
- ([#10235](https://github.com/quarto-dev/quarto-cli/issues/10235)): Configure the CI schedule trigger to activate exclusively for the upstream repository.
- ([#10295](https://github.com/quarto-dev/quarto-cli/issues/10235)): Fix regression to return error status to shell when `CommandError` is thrown.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
$mixColor,
percentage(quarto-math.div($percentMix, 100))
);
$contrastRatio: contrast($contrastColor, $bgColor);
$contrastRatio: quarto-contrast($contrastColor, $bgColor);
$percentMix: $percentMix - 1;
}

Expand Down Expand Up @@ -343,7 +343,7 @@

// Calculate the contrast ratio between two colors.
// See https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-tests
@function contrast($back, $front) {
@function quarto-contrast($back, $front) {
$backLum: luminance($back) + 0.05;
$foreLum: luminance($front) + 0.05;

Expand All @@ -361,8 +361,8 @@

$minimumContrast: 3.1;

$lightContrast: contrast($color, white);
$darkContrast: contrast($color, rgba(black, 0.87));
$lightContrast: quarto-contrast($color, white);
$darkContrast: quarto-contrast($color, rgba(black, 0.87));

@if ($lightContrast < $minimumContrast) and ($darkContrast > $lightContrast) {
@return "light";
Expand Down

0 comments on commit 81b2732

Please sign in to comment.