Skip to content

v0.3.0 — Smart Gather & Nesting

Choose a tag to compare

@github-actions github-actions released this 18 Aug 08:26
· 2 commits to main since this release

Safety-first semantic CSS refactoring and modernization workbench.

🧠 Smart Gather & Nesting

gather-related-selector-rules and the nest family now pick one home per rule instead of copying the same declarations into every matching parent.

  • Strongest existing parent wins: specificity first (.skip-link beats *; a class beats body). On a tie, prefix nesting (+ *, &:has(*)) beats appended &.
  • Appended & (MDN): when no stronger prefix home exists, reverse the context — .featured .card.card { .featured & { } }, :not(.card):not(&).
  • Gather through conditionals: related rules inside @media / @supports / @container / @starting-style can invert into the parent (.skip-link { :not(*) { @media (width <= 1024px) { … } } }).
  • Busy at-rules stay grouped: if an at-block has 3+ inner style rules that would land in 2+ different homes, the @media (etc.) is left populated. One or two inners, or every inner assigned to the same home, still nest into that selector.
  • Universal / document roots are weak homes: *, html, body, :root, and :host no longer absorb component rules via appended & (no more .skip-link+& / .skip-link:has(&) inside *).

🛡️ Safer Transformations

  • Selector lists are not combinators: ::view-transition-old(root), ::view-transition-new(root) is no longer rewritten as ::view-transition-new(root) { ::view-transition-old(root), & { } }. A comma list stays a list.
  • Pseudo-elements are not gather homes: & cannot represent ::…, so ::view-transition-* / ::before rules are not used as merge targets for other selectors.
  • Selector-list lines stay intact: &, / &::before, / &:hover, are not treated as declarations, so they no longer become &::before,; or a stray ;.
  • Missing semicolons repaired: last declarations without ; get one before a nested {, so display: block !important no longer runs into + .tabpanel {.
  • Media range syntax modernizes features with or without spaces: (max-width:60rem)(width <= 60rem).

📦 Version

0.2.10.3.0

This is a 0.x minor: same CLI and the same 26 rule IDs, but default gather/nest output can change. Dependents pinned to 0.2 will not pick this up automatically.


Official Multi-Platform Binaries

Platform Architecture Archive File
Windows Intel / AMD x64 cssforge-v0.3.0-windows-x64.zip
Windows Snapdragon / ARM64 cssforge-v0.3.0-windows-arm64.zip
Linux Intel / AMD x64 cssforge-v0.3.0-linux-x64.tar.gz
Linux Snapdragon / ARM64 cssforge-v0.3.0-linux-arm64.tar.gz
macOS Apple Silicon M-Series cssforge-v0.3.0-macos-arm64.tar.gz

Checksums

SHA256 checksums are available in SHA256SUMS.txt.

Verification Example

sha256sum -c SHA256SUMS.txt