-
Notifications
You must be signed in to change notification settings - Fork 6
WCSS Change Request Logic Hardening #281
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
ff56c47
4c20d13
2f492dd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,9 +14,9 @@ | |
| } | ||
|
|
||
| // Generate theme type classes | ||
| @mixin generate-theme-type-classes($use-fallback: false, $fallback-configs: null, $use-letter-spacing: true) { | ||
| @mixin generate-theme-type-classes($use-fallback: false, $fallback-configs: null, $accent-use-letter-spacing: true) { | ||
| @include generate-body-classes($use-fallback, if($fallback-configs != null, map-get($fallback-configs, 'body'), null)); | ||
| @include generate-display-classes($use-fallback, if($fallback-configs != null, map-get($fallback-configs, 'display'), null)); | ||
| @include generate-heading-classes($use-fallback, if($fallback-configs != null, map-get($fallback-configs, 'heading'), null)); | ||
| @include generate-accent-classes($use-fallback, if($fallback-configs != null, map-get($fallback-configs, 'accent'), null), $use-letter-spacing); | ||
| @include generate-accent-classes($use-fallback, if($fallback-configs != null, map-get($fallback-configs, 'accent'), null), $accent-use-letter-spacing); | ||
|
Comment on lines
+17
to
+21
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nitpick: Align naming between
|
||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
issue (bug_risk): Unconditionally setting the letter-spacing CSS variable may produce empty values when the config is missing that property.
Previously this variable was only emitted when
letter-spacingexisted in the config. Now, whentype-property-checkreturnsnull,#{null}becomes an empty string, yielding:This can change how other code distinguishes between “not set” and “intentionally empty” (e.g., via
var(--..., <fallback>)or computed style checks).If the variable should only exist when configured, keep the conditional:
If it must always exist, consider a clear sentinel value (e.g.,
initialornormal) instead of an empty value, depending on consumers’ expectations.