feat: nested selectors with lightningcss.#92
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #92 +/- ##
==========================================
+ Coverage 90.67% 90.71% +0.04%
==========================================
Files 18 18
Lines 6496 6535 +39
Branches 1176 1178 +2
==========================================
+ Hits 5890 5928 +38
- Misses 569 570 +1
Partials 37 37 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Adds Lightning CSS draft nesting support (enabled by default) so nested selectors work in CSS Modules, and updates related dependencies/CI tooling to support the change.
Changes:
- Enable
drafts.nestingby default when running Lightning CSS transforms, while preserving the ability to explicitly disable it. - Add fixtures and tests validating nested selector handling for CSS Modules (Node + browser/WASM paths).
- Bump package versions and update CI/workflow toolchain versions (Node matrix and GitHub Actions).
Reviewed changes
Copilot reviewed 12 out of 13 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| packages/playwright/package.json | Updates fixture app dependencies to consume @knighted/css@1.2.1 and newer @knighted/jsx. |
| packages/css/test/fixtures/misc/module-nesting/entry.js | Adds a JS entry fixture importing a CSS module for nesting coverage. |
| packages/css/test/fixtures/misc/module-nesting/button.module.css | Adds a CSS Modules fixture using nested selectors (&:hover). |
| packages/css/test/css.test.ts | Adds a test asserting nested selectors work with Lightning CSS defaults in CSS Modules mode. |
| packages/css/test/css.browser.test.ts | Extends the browser/WASM transform hook test to ensure drafts.nesting is passed through. |
| packages/css/src/css.ts | Introduces a narrow local type widening and defaults drafts.nesting to true in normalized Lightning CSS options. |
| packages/css/src/browser.ts | Extends WASM transform typings and passes drafts.nesting: true for CSS Modules in browser mode. |
| packages/css/package.json | Bumps package version and pins lightningcss dependency to 1.30.1; updates oxc-parser. |
| package.json | Updates dev tool dependencies and adds overrides to pin lightningcss and constrain c8’s yargs. |
| .github/workflows/publish.yml | Updates action versions and Node version used for publishing. |
| .github/workflows/playwright.yml | Updates action versions and Node versions used for Playwright E2E runs. |
| .github/workflows/ci.yml | Expands the Node matrix and updates action versions, including Codecov action. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
No description provided.