catppuccin / catppuccin/highlightjs

CSS if syntax dart-sass compatibility

Open
#75 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
SCSS
Stars
80
Forks
3
PR merge metrics
No merged PRs in 30d

Description

Since https://github.com/sass/dart-sass/releases/tag/1.95.0 the native if-syntax is supported and throws deprecation warnings

Deprecation Warning [if-function]: The Sass if() syntax is deprecated in favor of the modern CSS syntax.

Suggestion: if(sass($important): !important)

More info: https://sass-lang.com/d/if-function


73 │ color: map.get($colors, "text") if($important, !important, null);
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

../../../@catppuccin/highlightjs/sass/_theme.scss 73:39 @use

Can be fixed like this https://sass-lang.com/d/if-function

Though this is a breaking change since it is not compatible with older dart-sass versions I think

Contributor guide

Open the contributing guide

Research direction

Start with sass/_theme.scss at line 73 and reproduce the Dart Sass deprecation warning using the current theme. Update the conditional syntax as appropriate, then verify the warning is gone and check compatibility with the older Dart Sass versions mentioned in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
scss
Domain
frontend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.