Skip to content

Commit 81b2732

Browse files
authored
Merge pull request #10796 from quarto-dev/bugfix/issue-10608
css - don't define functions that override existing css functions
2 parents ae3570f + 69d5040 commit 81b2732

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

news/changelog-1.6.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ All changes included in 1.6:
6565

6666
## Other Fixes and Improvements
6767

68+
- ([#10608](https://github.com/quarto-dev/quarto-cli/issues/10608)): Don't overwrite the built-in CSS function `contrast` in Quarto's SCSS.
6869
- ([#10162](https://github.com/quarto-dev/quarto-cli/issues/10162)): Use Edge on `macOS` as a Chromium browser when available.
6970
- ([#10235](https://github.com/quarto-dev/quarto-cli/issues/10235)): Configure the CI schedule trigger to activate exclusively for the upstream repository.
7071
- ([#10295](https://github.com/quarto-dev/quarto-cli/issues/10235)): Fix regression to return error status to shell when `CommandError` is thrown.

src/resources/formats/html/bootstrap/_bootstrap-functions.scss

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
$mixColor,
4646
percentage(quarto-math.div($percentMix, 100))
4747
);
48-
$contrastRatio: contrast($contrastColor, $bgColor);
48+
$contrastRatio: quarto-contrast($contrastColor, $bgColor);
4949
$percentMix: $percentMix - 1;
5050
}
5151

@@ -343,7 +343,7 @@
343343

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

@@ -361,8 +361,8 @@
361361

362362
$minimumContrast: 3.1;
363363

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

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

0 commit comments

Comments
 (0)