Skip to content

Remove obsolete CSS features and enable obsolescence lint for CSS - #30478

Merged
ddbeck merged 2 commits into
mdn:mainfrom
Elchi3:enable-css-obsolete-lint
Sep 17, 2026
Merged

ddbeck merged 2 commits into
mdn:mainfrom
Elchi3:enable-css-obsolete-lint

Conversation

@Elchi3

@Elchi3 Elchi3 commented Sep 11, 2026 •

Copy link
Copy Markdown
Member

Summary

Right now, our irrelevance guideline is not applied to the css/ folder because the lint has been disabled (from the start when we first implemented this rule, there were just too many data points to clean up at the time). We're now down to 25 entries there and I think it is time to finally enable this lint for CSS, too.

If you enable the lint on main you get the following messages:

  ✖ css.properties.-moz-user-focus - Info → feature was implemented and has since been removed from all browsers dating back two or more years ago.
  ✖ css.properties.-webkit-mask-repeat-x - Info → feature was implemented and has since been removed from all browsers dating back two or more years ago.
  ✖ css.properties.-webkit-mask-repeat-y - Info → feature was implemented and has since been removed from all browsers dating back two or more years ago.
  ✖ css.properties.background-image.image-rect - Info → feature was implemented and has since been removed from all browsers dating back two or more years ago.
  ✖ css.properties.background-repeat-x - Info → feature was implemented and has since been removed from all browsers dating back two or more years ago.
  ✖ css.properties.background-repeat-y - Info → feature was implemented and has since been removed from all browsers dating back two or more years ago.
  ✖ css.properties.break-after.paged_context.recto - Error → feature was never implemented.
  ✖ css.properties.break-before.paged_context.recto - Error → feature was never implemented.
  ✖ css.properties.caption-side.left - Info → feature was implemented and has since been removed from all browsers dating back two or more years ago.
  ✖ css.properties.caption-side.right - Info → feature was implemented and has since been removed from all browsers dating back two or more years ago.
  ✖ css.properties.display.contents.focusable_elements - Error → feature was never implemented.
  ✖ css.properties.font-variant.greek_accented_characters - Error → feature was never implemented.
  ✖ css.properties.font-variant.uppercase_eszett - Error → feature was never implemented.
  ✖ css.properties.text-autospace.punctuation - Error → feature was never implemented.
  ✖ css.properties.text-autospace.replace - Error → feature was never implemented.
  ✖ css.selectors.-moz-broken - Info → feature was implemented and has since been removed from all browsers dating back two or more years ago.
  ✖ css.selectors.closed - Info → feature was implemented and has since been removed from all browsers dating back two or more years ago.
  ✖ css.selectors.empty.matches_whitespace - Error → feature was never implemented.
  ✖ css.selectors.scroll-button.next - Error → feature was never implemented.
  ✖ css.selectors.scroll-button.prev - Error → feature was never implemented.
  ✖ css.types.attr.type_function.url - Error → feature was never implemented.
  ✖ css.types.basic-shape.path.shape-outside - Error → feature was never implemented.
  ✖ css.types.image.paint.additional_parameters - Error → feature was never implemented.
  ✖ css.types.param.url - Error → feature was never implemented.
  ✖ css.types.param.url_fragments - Error → feature was never implemented.

I removed all of these except for:

  • css.properties.break-after.paged_context.recto: The linked impl_url bug is fixed and 87 seems to be the version number
  • css.properties.break-before.paged_context.recto: same

Test results and supporting details

Improved linting now passes for the CSS folder.
Future lints will prevent authors from adding all-false CSS features.

Related issues

None, I think.

Fixes #29834.

@Elchi3
Elchi3 requested review from a team as code owners September 11, 2026 09:13
@Elchi3
Elchi3 requested a review from caugner September 11, 2026 09:13
@github-actions github-actions Bot added infra Issue concerning project infrastructure, such as npm, GitHub Actions, or releases. data:css Compatibility data for CSS features. https://developer.mozilla.org/docs/Web/CSS linter Issue or pull request concerning JSON tests or linting. size:l Pull request changing 101-1,000 lines of code. labels Sep 11, 2026
@github-actions

github-actions Bot commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

Tip: Review these changes grouped by change (recommended for most PRs), or grouped by feature (for large PRs).

@caugner caugner 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, but I would reframe the PR title to removing these obsolete CSS features.

Not mandatory, but with PR stacks you could have the bottom PR removing the obsolete CSS features, another one on top that updates the non-obsolete CSS features, and a third one that removes the obsolete lint. This is slightly more work when doing these changes all manually, but simplifies the reviews, and allows to merge them all together (in three separate commits) when all are approved.

@Elchi3 Elchi3 changed the title Enable obsolescence lint for CSS Remove obsolete CSS features and enable obsolescence lint for CSS Sep 11, 2026
@github-actions github-actions Bot added the merge conflicts 🚧 This PR needs to merge latest "main" branch to resolve a merge conflict or other issue. label Sep 14, 2026
@github-actions

Copy link
Copy Markdown
Contributor

This pull request has merge conflicts that must be resolved before it can be merged.

@github-actions github-actions Bot removed the merge conflicts 🚧 This PR needs to merge latest "main" branch to resolve a merge conflict or other issue. label Sep 14, 2026
@Elchi3

Elchi3 commented Sep 14, 2026

Copy link
Copy Markdown
Member Author

✖ css.types.param.url - Error → feature was never implemented.
✖ css.types.param.url_fragments - Error → feature was never implemented.

This was recently added and even minted to a web-feature (that's why I had merge conflicts). This PR removes these keys again.

cc @ddbeck who reviewed web-platform-dx/web-features#4322

@Elchi3

Elchi3 commented Sep 17, 2026 •

Copy link
Copy Markdown
Member Author

@ddbeck do you agree with removal? (some keys are fairly recent and in web-features, but I think that was a mistake).

@ddbeck ddbeck 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.

Yes, I am happy with this. Thank you!

@ddbeck
ddbeck merged commit 356b204 into mdn:main Sep 17, 2026
11 checks passed
@mdn-bot mdn-bot mentioned this pull request Sep 17, 2026
@Elchi3
Elchi3 deleted the enable-css-obsolete-lint branch September 17, 2026 11:00
Elchi3 pushed a commit that referenced this pull request Sep 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

data:css Compatibility data for CSS features. https://developer.mozilla.org/docs/Web/CSS infra Issue concerning project infrastructure, such as npm, GitHub Actions, or releases. linter Issue or pull request concerning JSON tests or linting. size:l Pull request changing 101-1,000 lines of code.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

css.selectors.empty - All browsers shown as incompatible despite being compatible

3 participants