Skip to content

rule_order: merge a same-slot pair at a position between them - #216

Open
samoht wants to merge 2 commits into
mainfrom
canon-remerge-after-expand
Open

rule_order: merge a same-slot pair at a position between them#216
samoht wants to merge 2 commits into
mainfrom
canon-remerge-after-expand

Conversation

@samoht

@samoht samoht commented Jul 29, 2026

Copy link
Copy Markdown
Owner

expand_lists splits a selector-list rule into one rule per selector, which can leave two rules on a single selector that neither end of the pair can host: folding the earlier one forward passes a write that observes it, and folding the later one back passes a different one. coalesce tested only those two endpoints, so it gave up while a position between them was legal for both, and a factored sheet canonicalised to a different shape from an unfactored one. --diff=canonical then reported the second rule's declarations as missing.

On the tailwindcss.com comparison this closes eight phantom entries, the four text-xs/N and four drop-shadow-* rules, with no entry appearing that was not already reported before the change.

samoht added 2 commits July 29, 2026 22:36
Expanding a selector list leaves two rules on one selector that neither
endpoint can host: folding the earlier one forward passes a write that
observes it, folding the later one back passes a different one. A position
between the two is legal for both, since each then crosses a shorter
interval, so a factored sheet reaches the shape an unfactored one starts
from instead of canonicalising to a different one.
@samoht
samoht force-pushed the canon-remerge-after-expand branch from bcb8957 to dc8dde9 Compare July 29, 2026 22:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant