Skip to content

chore(frontend): drop unused autoprefixer dep - #5935

Merged
norman-abramovitz merged 3 commits into
cloudfoundry:developfrom
nabramovitz:norm/chore/drop-autoprefixer
Sep 16, 2026
Merged

norman-abramovitz merged 3 commits into
cloudfoundry:developfrom
nabramovitz:norm/chore/drop-autoprefixer

Conversation

@nabramovitz

@nabramovitz nabramovitz commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

Closes the loop on #5933, which proposed bumping autoprefixer 10.5.5 to 10.6.0. The dependency is unused, so it is removed rather than bumped.

Why it is dead

autoprefixer is a root devDependency that nothing resolves:

  • postcss.config.json registers only @tailwindcss/postcss.
  • The app builds through @angular-devkit/build-angular:application, which delegates to @angular/build — a package with no autoprefixer reference at all. ng-packagr has none either.
  • The only require('autoprefixer') in the tree sits in @angular-devkit/build-angular/src/tools/webpack/configs/styles.js, the legacy webpack path, which this project does not use.
  • Vendor prefixing now comes from esbuild, whose target @angular/build derives from the browserslist file via src/tools/esbuild/target.js.

How it got here

The Tailwind v4 migration in 81f7622 removed autoprefixer from the PostCSS plugin list, with a comment recording why:

// Tailwind v4 PostCSS pipeline.
// v4 has native CSS Nesting and Lightning-CSS-based vendor prefixing,
// so the v3 helpers (tailwindcss/nesting + autoprefixer) are gone.

That commit added @tailwindcss/postcss to the manifest but did not remove the entry it replaced. The config migrated; the dependency list did not.

Verification

Built develop and this branch and compared the emitted stylesheet:

before (autoprefixer 10.5.5 installed): 157252 bytes  md5 32b982cc15745772d594537f14bcd9da
after  (dependency removed)           : 157252 bytes  md5 32b982cc15745772d594537f14bcd9da

Byte-identical, 30 -webkit- prefixes either way, and the one hand-written -webkit-line-clamp rule is unchanged. Both builds exit 0 with 0 errors.

Also in this PR

Removing the direct dependency collapses a duplicate resolution — autoprefixer now appears once, as build tooling's own transitive dep at 10.5.4, instead of twice at 10.5.4 and 10.5.5.

Two references the v4 migration left stranded are cleaned up: the packages/core/browserslist header naming autoprefixer as its reader, and an autoprefixer: ignore next directive nothing reads any more. The hand-written -webkit- properties it guarded are untouched.

Second commit: the dead Firefox fade block

Unrelated to autoprefixer, but in the same file, so it rides along as its own commit.

98ec379 commented out a Firefox-only fade overlay in 2019 rather than deleting it, marking it "no longer fit for purpose". It was a workaround for Firefox lacking multi-line text ellipsis, and it applied unconditionally — single-line titles got a fade that cut them off (#3544).

The premise expired three months later: Firefox 68 shipped -webkit-line-clamp in July 2019, so Firefox clamps through the same rule as every other target. The browserslist entries are Firefox ESR and last 2 versions, both well past 68.

That left twenty lines of commented-out CSS whose opening line states something untrue. The rationale stays in the commit history and in the linked issue.

Sass strips // comments before they reach CSS, so this cannot affect output — and the byte-identical check above was re-run with this commit applied, still matching develop exactly.

Tailwind v4 replaced the v3 PostCSS helpers, and 81f7622 removed
autoprefixer from the plugin list when it migrated the pipeline. The
devDependency was never removed alongside it.

Nothing resolves the root copy today. postcss.config.json registers
only @tailwindcss/postcss, and the app builds through
@angular-devkit/build-angular:application, which delegates to
@angular/build -- a package with no autoprefixer reference at all.
The only require() sits in the legacy webpack styles config, which
this project does not use. Vendor prefixing now comes from esbuild,
whose target @angular/build derives from the browserslist file.

Removing the direct dependency collapses the duplicate resolution:
autoprefixer stays in the tree as build-angular's own transitive
dep, at its pinned 10.5.4, instead of two copies at 10.5.4 + 10.5.5.

Also drops two references that the migration left stranded: the
browserslist header naming autoprefixer as its reader, and an
ignore-next directive no longer read by anything. The hand-written
-webkit- line-clamp properties it guarded are unchanged.
98ec379 commented out this Firefox-only fade overlay in 2019 rather
than deleting it, recording it as "no longer fit for purpose". It was a
workaround for Firefox lacking multi-line text ellipsis, and it applied
unconditionally, so single-line titles got a fade that cut them off --
issue 3544.

The premise expired three months later: Firefox 68 shipped
-webkit-line-clamp in July 2019, so Firefox now clamps through the same
rule as every other target. The browserslist entries here are Firefox
ESR and last 2 versions, all well past 68.

That leaves twenty lines of commented-out CSS whose opening line states
something untrue. The rationale is preserved in the commit and in the
linked issue.

@norman-abramovitz norman-abramovitz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM for the latest change

@norman-abramovitz
norman-abramovitz merged commit 8aca7db into cloudfoundry:develop Sep 16, 2026
24 checks passed
@nabramovitz
nabramovitz deleted the norm/chore/drop-autoprefixer branch September 16, 2026 23:02
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.

2 participants