Repository navigation
Support all modern logical properties
-
Logical Properties Shim/Experimental System: Major feature extension adding support for previously unsupported CSS logical properties and values
- New
logical-shim.tsmodule with extensible architecture SHIM_DECLARATIONSobject mapping logical properties to transformation functionsextendProcessors()function for seamless integration with existing postcss-logical functionality- Minimal-impact approach that extends rather than replaces core functionality
- New
-
Scroll Properties Support: Full support for CSS scroll-related logical properties
scroll-margin-inline-start/endwith direction-aware transformation toleft/rightscroll-margin-block-start/endtransformation totop/bottomscroll-padding-inline-start/endwith direction-aware transformation toleft/rightscroll-padding-block-start/endtransformation totop/bottom- Shorthand support:
scroll-margin-inline,scroll-margin-block,scroll-padding-inline,scroll-padding-block - Proper value parsing for multi-value shorthands (start/end value handling)
-
Logical Values Support: Support for logical values in existing CSS properties
float: inline-start/end→ direction-awareleft/righttransformationclear: inline-start/end→ direction-awareleft/righttransformationresize: block/inline→vertical/horizontaltransformation- Preserves non-logical values unchanged
-
Scroll Properties Support Overflow Properties (⭐ NEW via shim)
overscroll-behavior-block→overscroll-behavior-yoverscroll-behavior-inline→overscroll-behavior-xoverflow-block→overflow-yoverflow-inline→overflow-x
-
Scroll Properties Support CSS Containment Properties (⭐ NEW via shim)
contain-intrinsic-block-size→contain-intrinsic-heightcontain-intrinsic-inline-size→contain-intrinsic-width
-
Smart Selector Priority Optimization: NEW! Advanced rightmost priority logic for predictable CSS behavior
- Implements rightmost priority algorithm that prioritizes the most specific (rightmost) direction selector in complex selector chains
- Handles mixed built-in (
:dir(),[dir]) and custom direction selectors seamlessly - Eliminates unexpected behavior from contradictory direction contexts
- Follows CSS cascade principles for intuitive results
- Framework-agnostic support for any custom selector pattern
- Comprehensive test coverage for edge cases and complex nested scenarios
- New example demonstrating the optimization with real-world selector chains
-
Enhanced Documentation: Comprehensive documentation improvements
- New technical documentation (
SELECTOR-PRIORITY-OPTIMIZATION.md) explaining the rightmost priority logic - Updated README with detailed explanations and examples of the new optimization
- Added selector priority optimization example in
examples/selector-priority/ - Bilingual documentation (English/Chinese) for broader accessibility
- New technical documentation (
Enhanced
-
Property Detection: Extended logical property detection to include shim-supported properties
- Updated
supportedLogicalPropertiesSetwith all shim-enabled properties - Improved accuracy for property classification and transformation decisions
- Better integration between core logical properties and shim extensions
- Updated
-
Test Coverage: Comprehensive test suite expansion to 250 tests (100% pass rate)
- Added unit tests for all shim functionality in
logical-properties-unit.test.ts - Integration tests for combined shim and core features
- Enhanced
limitations-handling.test.tswith shim capability demonstrations - Exception handling and edge case coverage
- CSS variables interaction testing with logical property names
- Added unit tests for all shim functionality in
-
Output Optimization: Intelligent rule consolidation for better CSS output
- Direction-independent properties consolidated in main rules
- Direction-dependent properties separated into
[dir="ltr"]/[dir="rtl"]variants only when needed - Reduced CSS output size through smart property grouping
- Better performance with fewer duplicate declarations