GeezerVison is showing github.com — fix(core): unresolved var() unsets the whole value and invalid color-mix() no longer renders white by edusperoni · Pull Request #11593 · NativeScript/NativeScript
Conversation
PR Checklist
What is the current behavior?
argbFromColorMix() returns -1 when @csstools/css-color-parser cannot parse the value, and ColorBase stores it as the color. That is opaque white on Android, and transparent blue (invisible) on iOS, which builds the color from the r/g/b/a getters.
- The usual trigger is an unresolved variable nested in a function.
_evaluateCssVariableExpression substitutes unset inline, so color-mix(in srgb, var(--missing) 35%, transparent) becomes color-mix(in srgb, unset 35%, transparent), which fails to parse.
- The same inline substitution makes
calc(var(--missing) + 10) evaluate to 10.
What is the new behavior?
This follows the CSS spec:
- Unresolved
var(): a var() with no value (undefined, empty, or unset) and no fallback that resolves makes the whole declaration invalid at computed-value time, so the property is unset. This holds wherever the var() is nested: color-mix(), calc(), shorthands, multi-value strings. An unresolved var() inside the fallback of a var() that did resolve is ignored, as in browsers: var(--defined, var(--missing)) gives --defined.
- Malformed
color-mix(): throws Invalid color: <value>, like every other unparseable color string. The cascade already catches and traces that, so the declaration is dropped instead of painting white.
Behavior changes:
calc(var(--missing) + 10) is now unset instead of 10.
margin: var(--a) var(--missing) now unsets the whole shorthand instead of only the missing part.
- The
color-mix(in --swop5c, red, blue) spec used to assert the decoded -1 sentinel. It is now a throw case: without a color profile the value cannot be parsed, and browsers drop it too.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
…mix() no longer renders white
A var() referencing an undefined or empty custom property, with no
fallback or with a fallback that also fails to resolve, now makes the
whole declaration unset, as CSS specifies for values that are invalid at
computed-value time. Before, `unset` was substituted inline, so values
like `color-mix(in srgb, var(--missing) 35%, transparent)` turned into
an unparseable color, and `calc(var(--missing) + 10)` evaluated to 10.
A color-mix() that fails to parse now throws `Invalid color: <value>`
like every other malformed color string, so the declaration is dropped.
Before, the parser's -1 sentinel was stored as the color, which renders
as white on Android and transparent blue on iOS.
nx-cloud
Bot
commented
Oct 29, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|
View your CI Pipeline Execution ↗ for commit 7880788
| Command |
Status |
Duration |
Result |
nx test apps-automated -c=android |
✅ Succeeded |
3m 53s |
View ↗ |
nx run-many --target=test --configuration=ci --... |
✅ Succeeded |
9s |
View ↗ |
💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗
☁️ Nx Cloud last updated this comment at 2026-10-29 16:56:58 UTC
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
pkg-pr-new
Bot
commented
Oct 29, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|
Open in StackBlitz
npm i https://pkg.pr.new/@nativescript/core@11593
npm i https://pkg.pr.new/@nativescript/vite@11593
npm i https://pkg.pr.new/@nativescript/webpack@11593
commit: 7880788
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
# Conflicts:
# packages/core/ui/core/properties/css-variable-expression.spec.ts
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|