Skip to content

Skill: for CSS-only changes, diff the shipped CSS first to find the reach #102

Closed

Description

@tmashara

In a stylelint upgrade with ~60 SCSS edits (rgba→rgb, longhands→shorthands, removed duplicates), the most useful step was not in the skill:

  1. Build base and change.
  2. Diff the built CSS.

Most edits produced identical bytes after the bundler's minifier (Sass normalises rgb(), and lightningcss merges longhands and duplicates). That left 5 real rule deltas, and grepping the built HTML for those selectors gave 5 routes. That told me which routes to shoot, and that the rest needed no shots.

Suggestions:

  • Skill: under "CSS only", add "diff the built CSS of both sides first; identical bytes need no shots; grep built HTML for the changed selectors to pick routes".
  • Feature, optional: renderdiff reach <left-css> <right-css> --html <dir> that lists changed rules and the pages whose DOM matches them.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions