Skip to content

build(*): define the library's minimum browser versions - #17756

Open
simeonoff wants to merge 2 commits into
masterfrom
simeonoff/refactor/browrer-support
Open

simeonoff wants to merge 2 commits into
masterfrom
simeonoff/refactor/browrer-support

Conversation

@simeonoff

Copy link
Copy Markdown
Member

Closes #17709

Description

Defines the library's minimum browser versions in projects/igniteui-angular/.browserslistrc:

baseline widely available on 2026-05-07
not Chrome < 131
not Edge < 131
not Firefox < 151
not Safari < 18
not iOS < 18

It starts from Angular's default targets and removes only the versions the library's styles can't support. Container style queries, which gate every design-system rule, need Firefox 151 and Safari 18. Relative colors, already used in the grid, need Chrome and Edge 131. Every browser family Angular targets stays in, including Android Chrome and Firefox for Android.

scripts/sass.mjs now passes each stylesheet's path to autoprefixer, so the compiled component CSS, the generated *.styles.ts files and the theme presets use the same targets as ng-packagr. Without this, the floor would only reach ng-packagr's own CSS step.

The README's Browser Support table now lists the minimum versions (the IE 11 note is unchanged), and the 23.0.0 changelog records them.

Motivation / Context

@damyanpetev, this revisits #14528, where you removed the root .browserslistrc because it had become a leftover override and Angular's default already matched our needs. That was true then. Since the scoped-styles work (#15125), our styles depend on CSS that Angular's default doesn't guarantee: on Firefox 119–150 and Safari 17, the design-system rules don't apply at all. So this doesn't restore the old override. It narrows Angular's default instead of replacing it, is scoped to the library project, and keeps Angular's baseline date. Your view on this approach matters here.

The gap between Angular's default and this floor is about 3.8% of global users by browserslist data. Firefox ESR 140, the last ESR below 151, reaches end of life on 2026-10-13.

Part of Stage 0 (#17707) of #17669.

Type of Change (check all that apply):

  • Bug fix
  • New functionality
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactoring (no functional changes)
  • Documentation
  • Demos
  • CI/CD
  • Tests
  • Changelog
  • Skills/Agents

Component(s) / Area(s) Affected:

Build configuration, theming output, README

How Has This Been Tested?

  • Unit tests
  • Manual testing
  • Automated e2e tests

Built the component styles, the theme presets and the library (ng build igniteui-angular --configuration production) before and after the change and compared the output token by token. Nothing was added. The only removals are vendor prefixes the new targets don't need, about 8 KB across 40 compiled files: -moz-user-select, -moz-/-webkit-appearance, -moz-fit-content/-moz-max-content, -moz-column-gap, -o-object-fit, -webkit-backdrop-filter, the generated ::-moz-placeholder rules (all ::placeholder rules remain), and generated :-webkit-autofill copies (the hand-written input:-webkit-autofill, input:autofill selectors remain). Karma suites were not run.

Test Configuration:

  • Angular version: 22.2
  • Browser(s): n/a (build output comparison)
  • OS: macOS

Screenshots / Recordings

n/a

Checklist:

  • All relevant tags have been applied to this PR
  • This PR includes unit tests covering all the new code (test guidelines)
  • This PR includes API docs for newly added methods/properties (api docs guidelines)
  • This PR includes feature/README.MD updates for the feature docs
  • This PR includes general feature table updates in the root README.MD
  • This PR includes CHANGELOG.MD updates for newly added functionality
  • This PR contains breaking changes
  • This PR includes ng update migrations for the breaking changes (migrations guidelines)
  • This PR includes behavioral changes and the feature specification has been updated with them
  • Accessibility (ARIA, keyboard navigation, focus management) has been verified

Add projects/igniteui-angular/.browserslistrc. It takes Angular's default targets (baseline widely available on 2026-05-07) and removes only the versions the library's styles can't support: container style queries need Firefox 151 and Safari 18, and relative colors need Chrome and Edge 131. Unlike the root override removed in #14528, it doesn't replace Angular's default; it narrows it, and the baseline date is kept in sync with @angular/build.

Pass each stylesheet's path to autoprefixer in scripts/sass.mjs so the compiled component CSS, the generated .styles.ts files and the theme presets follow the same targets as ng-packagr. The only output change is dropped vendor prefixes, about 8 KB.

Document the minimum versions in the README and in the 23.0.0 changelog.

Copilot AI 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.

🟢 Approval recommended

The configuration, build processing, and documentation consistently implement the stated browser support policy.

0 open findings

What changed in this PR

Defines and documents the library’s browser support floor while aligning all Sass-generated output with ng-packagr’s targets.

Changes:

  • Adds Angular 22-based browser targets with stricter minimum versions.
  • Passes source paths to Autoprefixer for consistent target resolution.
  • Documents the browser floor in the README and changelog.
File Description
projects/​igniteui-angular/​.browserslistrc Defines minimum supported browser versions.
scripts/​sass.mjs Applies project targets to generated CSS.
README.md Documents browser support requirements.
CHANGELOG.md Records the browser floor for 23.0.0.

🧠 Review effort: Balanced


Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.

This branch has not been deployed

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CSS] T0.1 Formalize the browser floor

3 participants