Repository navigation
fix(theme): temporarily keep native controls in light mode - #3479
Merged
Merged
Conversation
Add a removable native color-scheme declaration while preserving legacy theme variables and DOM-free imports. Include focused regressions, root-consumption guidance, and a patch changeset. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
🦋 Changeset detectedLatest commit: 30aac99 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The two moderate test-validation issues must be addressed before approval.
1 open issue
What changed in this PR
This pull request adds a temporary light-only color scheme to @equinor/fusion-web-theme, keeping browser-native controls aligned with Fusion’s light palette while documenting integration limitations.
Changes:
- Adds
color-scheme: only lightto the exported color and aggregate declarations. - Adds regression tests for declaration composition, ordering, uniqueness, and DOM-free imports.
- Documents root stylesheet usage and modern EDS limitations.
- Adds a patch changeset and package test script.
| File | Summary |
|---|---|
packages/theme/tests/colors.test.ts |
Adds regression coverage; two moderate issues remain because the compatibility check derives its baseline from current declarations and the fresh-process check targets the source entry rather than the published artifact. |
packages/theme/src/styles/colors.ts |
Adds the temporary light-only native control declaration while preserving existing variables. |
packages/theme/README.md |
Documents stylesheet application, scope, and modern EDS limitations. |
packages/theme/package.json |
Adds the package test script. |
.changeset/theme-native-light-mode.md |
Records the patch release and behavior change. |
Review effort: Lite
Address Copilot feedback with a fixed 75-declaration snapshot verified against the pre-change Git baseline. Build before testing DOM-free imports through the published entry point. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
eikeland
previously approved these changes
Oct 22, 2026
eikeland
requested changes
Oct 22, 2026
chdefrene
force-pushed
the
chdefrene-theme-native-light-mode
branch
from
October 22, 2026 10:48
2360357 to
30aac99
Compare
eikeland
approved these changes
Oct 22, 2026
This was referenced Oct 22, 2026
This was referenced Oct 26, 2026
Merged
Merged
Merged
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.

Component Development
Type
Reference to assignment
Related: equinor/fusion-core-tasks#2120 (not closed by this PR).
Supersedes equinor/fusion-web#52 following migration of the theme package. The old PR remains open because fusion-web is archived/read-only.
Description of assignment
Temporarily keep browser-native controls aligned with Fusion's light palette in the relocated
@equinor/fusion-web-themepackage. Isolate the policy so it can be removed when Fusion supports dark mode.Description of Proposed Changes
color-scheme: only lightentry incolorVariables, inherited once by aggregateattributes; preserve all 75 existing color declarations and their order.Importing the package does not inject CSS or mutate DOM/HTML attributes. Consumers must apply the declarations on the document root; protection starts when the stylesheet applies. This protects native controls, not modern EDS token palette selection:
color-schemedoes not disableprefers-color-scheme, and modern EDS consumers still needdata-color-scheme="light"onhtml. No React provider changes or new legacy token imports.Validation:
bun run --cwd packages/theme test— passed, including build: 4 tests / 1 committed snapshot / 9 assertions. The original regressions failed before the implementation.bun run --cwd packages/theme build— passed.bun run check -- packages/theme— passed, 10 files.git diff --check— passed.dist/index.jswith throwingdocument/windowgetters — passed.bun /Users/christian.frene/.copilot/session-state/41fc6c0e-5564-4b54-bccb-99e10e6d1b1c/files/validate-theme-chrome.ts— passed against generated root declarations in isolated Chrome 156.0.8078.48. Initial light → dark → light and initial dark → light → dark retained light-only computed schemes and white native input/select backgrounds, including controls in a body-mounted overlay. Media-query emulation changed correctly; screenshots and JSON evidence are session artifacts. Subsequent review fixes only change tests, the test command, and documentation.Full monorepo/Storybook and authenticated application validation were not run. Browser checks do not establish modern EDS palette selection or native select popup rendering.
Checklist
Create User Story(DevOps) or Issue(Github)
No new UI design; use a removable CSS declaration only.
Development
No Storybook stories added for this declaration-only fix. A fixed legacy-output snapshot is committed; isolated native-control screenshots were inspected separately.
Create Pull Request
GitHub rejected the requested
fusion-core-code-reviewersteam because it is not a repository collaborator. No permission changes were made.Review of Pull Request
Address Copilot's fixed-baseline comment and built-entry validation concern in separate signed review-fix commit 30aac99; reply to and resolve the inline thread.
Publish Code
Patch changeset included; release automation owns versioning.