Repository navigation
fix(core): make background: none clear the background color - #11536
Merged
Merged
Conversation
|
View your CI Pipeline Execution ↗ for commit d1f2985
💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗ ☁️ Nx Cloud last updated this comment at |
commit: |
`background: none` left background-color unset, so a native control such as a button kept its own background. The shorthand parser did not accept the `none` keyword at all, so the declaration failed to expand and none of the background longhands changed. The background parser now reads `none` as the image component, and the `background` shorthand maps it to no image and, unless the declaration also gives a color, to a transparent background-color, the initial value CSS resets it to. Shorthands that only give an image, repeat or position still leave background-color unset, so views keep their native default background behind an image.
triniwiz
force-pushed
the
fix/background-none
branch
from
October 15, 2026 13:17
fce6c07 to
cda7bbf
Compare
NathanWalker
approved these changes
Oct 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
PR Checklist
What is the current behavior?
background: nonechanges nothing: the background parser does not accept thenonekeyword, so the shorthand fails to expand and none of the background longhands change. A native control such as a button keeps its own background (e.g. Bootstrap's.nav-linkpills, or any CSS reset that clears button backgrounds).What is the new behavior?
noneas the image component.backgroundshorthand maps it to no image and, unless the declaration also gives a color, to a transparentbackground-color, the initial value CSS resets it to.background-colorunset, so views keep their native default background behind an image (e.g. the iOS Page's white).Tests: 3 parser cases in
css/parser.spec.tsand 4 specs inui/styling/style-properties.spec.ts.apps/automatedgainstest_setting_background_none_from_CSS_makes_backgroundColor_transparent.Verified with all of these core PRs merged together (#11527–#11537):
apps/automatedpasses on the iOS 26.4 simulator (1830 OK, 0 failed) and on an Android API 36 emulator (1692 OK; the one failure is the network-dependentIMAGE-CACHE.test_ImageCache_ValidUrltimeout, which also passes on reruns).