Skip to content

v0.2.0 — Gather Related Selectors, Select All & Windows TUI Scroll Fix

Choose a tag to compare

@github-actions github-actions released this 17 Aug 17:35
· 14 commits to main since this release

Safety-first semantic CSS refactoring and modernization workbench.

Gather related selector rules

CSSForge can now gather scattered, non-adjacent occurrences of the same selector into one canonical rule block.

/* before — same selector, far apart */
.skip-link { position: absolute; font-weight: 700; }
/* …unrelated rules, comments, @keyframes… */
.skip-link { font: optional; }
.skip-link+* { display: block; }
.skip-link::backdrop { background-color: gray; }
.skip-link:has(*) { color: #27ca3f; }
/* after */
.skip-link {
    position: absolute;
    font-weight: 700;
    font: optional;

    + * { display: block; }
    &::backdrop { background-color: gray; }
    &:has(*) { color: #27ca3f; }
}

What is gathered:

  • Exact selector duplicates — later blocks merge into the first; declarations are promoted to the top of that block
  • Directly attached pseudo-classes / elements → &:hover, &:has(*), &::backdrop
  • Combinator variants → + *, > .child, ~ .peer
  • Whitespace descendants → :not(*), .child (no spurious &)

Intervening rules, comments, and @keyframes are left untouched.

Safety: REVIEW. Requires --allow-review on the CLI, or enabling the rule in the TUI. Verify cascade order after apply.

TUI

  • Windows scroll fix on Select Rules: wrapped descriptions no longer bleed into the next row or desync the cursor. Each rule is one clipped line; only the list pane scrolls; header and enabled-count stay fixed.
  • PgUp / PgDn move the rules (and files) cursor by a page.
  • Select All (a) on the rules screen — same toggle-all behavior as files. Press again to deselect all.

Fixes

  • Worktree preservation: GatherRelatedSelectorRules previously replaced first.start..last.end, deleting everything between non-adjacent matches (including @keyframes). It now writes one replacement at first.start..first.end and a deletion plan per later occurrence.
  • Descendant & prefix: extract_related_nested_selector no longer prepends & to whitespace-separated descendants. .skip-link :not(*) nests as :not(*), not &:not(*).

Version

0.1.00.2.0

Official Multi-Platform Binaries

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

Checksums

SHA256 checksums are available in SHA256SUMS.txt.

Verification Example

sha256sum -c SHA256SUMS.txt