Repository navigation
fix: preserve logical CSS cascade and upgrade postcss-logical to v9 - #1
Merged
Merged
Conversation
Welcome to Codecov 🎉Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests. Thanks for integrating Codecov - We've got you covered ☂️ |
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.
Direction-rule optimization could change CSS cascade results. For example,
.x { margin-inline-start: 10px; margin: 0 }rendered with a 10px left margin in LTR after compilation, although native CSS renders 0px. Gradient replacement also rewrote names such asvar(--inline-start)andurl("inline-start.png"), and text-based direction detection misclassified negation and quoted attribute values.Resolve duplicate physical declarations by importance and source order. Keep common declarations shared, while retaining overlapping shorthand/longhand dependencies in the relevant direction rules at their winning source positions. This preserves cascade results without introducing repeated property names within an optimized rule. Fix the existing border-inline fixture: its later width/style/color declarations must remain effective after direction-specific border shorthands. The plugin API and default options stay unchanged.
Use selector and value parsers to preserve selector conditions, custom-property names and strings. Handle repeated/chained/escaped custom markers and configured selector lists. Keep prefixed keyframes intact, retain unexpanded nested rules with a preprocessing warning, preserve rule comments and accurately map generated declarations to their original source lines. Handle function values, comments, invalid scroll shorthands and case-insensitive CSS property/value spellings.
Align the advertised requirements with the existing postcss-logical dependency (Node >=20.19.0, PostCSS ^8.4). Update README, technical docs and CHANGELOG, including nesting, horizontal writing mode and direction-selector specificity constraints. Clarify who needs a dual-direction logical-property polyfill and compare native CSS, fixed-direction compilation and RTL mirroring. Add ESM and explicit HTML direction setup, repair documentation links and incorrect integration options, and update npm metadata. Configure the documentation site URL to generate its sitemap. Upgrade postcss-logical to ^9.0.2, preserving our CommonJS and ES module entry points. Forward upstream warnings to the outer PostCSS result and deduplicate direction-pass warnings. Correct documentation about existing transition support. CI tests Node 20.19.0/22/24, uses packageManager-pinned pnpm and frozen installs, checks packed consumers and browser cascade, and deploys documentation only on main pushes. The two parser dependencies are explicitly declared; Playwright core is a development dependency and uses the installed Chromium/Chrome browser.
Validation: