Skip to content

unprefix the -webkit-user-select CSS property #1000

Closed

Description

@o-t-w

Description

The user-select CSS property still needs a -webkit- prefix in Safari.

A note about the current state of CSS vendor prefix’s

  • Chrome, Edge and other Chromium-based browsers had required a -webkit- prefix for print-color-adjust. This is no longer the case as of version 136.
  • As part of Interop 2025, Safari removed the need for the -webkit- prefix for the text-decoration CSS shorthand property.

That leaves only a handful of properties requiring a prefix:

  • user-select
  • stretch: Implemented as -webkit-fill-available in WebKit and -moz-available in Firefox.
  • text-size-adjust: Needs -webkit- prefix in WebKit and Firefox. (Firefox also supports the -moz- prefix.)
  • box-decoration-break: Needs -webkit- prefix in WebKit.
  • line-clamp: Needs a -webkit- prefix and some additional non-standard properties (display: -webkit-box and -webkit-box-orient: vertical) to be set in Chromium, WebKit and Firefox.

Autoprefixer is downloaded from NPM 33 million times per week. Needing to complicate build tooling with Autoprefixer for such a tiny handful of properties is an unfortunate situation.

Of those properties that do require a prefix, some are pretty niche, but that can’t be said for user-select. While line-clamp is another very useful and popular CSS feature that requires a prefix, Autoprefixer doesn’t prefix line-clamp, so it is primarily user-select that necessitates continued use of Autoprefixer). While ideally no property would require a prefix, for the reason just stated user-select in particular should be prioritised.

Specification

https://drafts.csswg.org/css-ui-4/#content-selection

web-feature

https://web-platform-dx.github.io/web-features-explorer/features/user-select/

Test Links

https://wpt.fyi/results/css/css-ui?label=master&label=experimental&aligned&q=user-select

Additional Signals

WebKit issue
Unmerged PR
various open bugs.

Activity

  1. github-actions commented on Sep 4, 2025

    @github-actions

    This comment was automatically generated based on the information you provided. Please don't edit it.

    Below is additional information about the web feature (from the web-features project) which is referenced in your proposal.
    If this doesn't accurately correspond to your proposal, please update your initial comment to include web-features: <feature-id>.
    To find feature IDs, use the web-features explorer.

    Feature user-select

  2. foolip commented on Sep 5, 2025

    @foolip
    Member

    @o-t-w thank for submitting this proposal! I took the liberty of editing your description to link https://web-platform-dx.github.io/web-features-explorer/features/user-select/, in order to help the bot (above) pick out the right feature for this.

  3. changed the title [-]unprefix the -webkit-user-select CSS property[/-] [+]unprefix the `-webkit-user-select` CSS property[/+] on Sep 6, 2025
  4. dholbert commented on Dec 9, 2025

    @dholbert

    Test Links

    https://wpt.fyi/results/css/css-ui?label=master&label=experimental&aligned&q=user-select

    One suggested refinement to the Test Links here:

    Right now the tests exercise the contain value for user-select, but no browser supports that keyword (and it's not mentioned above), so I suspect we're not intending for this interop focus-area to be a forcing factor on all browsers implementing it.

    Specifically these tests have subtests that check for user-select:contain (which fail in Chromium/Gecko/WebKit):
    https://wpt.fyi/results/css/css-ui/parsing/user-select-computed.html
    https://wpt.fyi/results/css/css-ui/parsing/user-select-valid.html
    https://wpt.fyi/results/css/css-ui/user-select-inheritance.html

    So: if this proposal is adopted, I suggest that we either:
    (A) fork these^ tests so that user-select: contain is tested in a separate tests (which will not be part of the interop set of tests). Maybe user-select-computed-contain.html which is a copy of user-select-computed.html just to test that one value, for example. (Slightly clumsy, but we do it sometimes for the benefit of the interop project.)

    ...or:
    (B) Just remove those 3 tests entirely; they're basic smoke-tests for properly handling the property in CSS, but the remaining tests likely cover that pretty well, too.)

    Maybe for now it's best to just plan for (B) since it's simplest, and we can do (A) if & when the proposal is adopted, if we want to add a bit more test coverage.

  5. frivoal commented on Jan 29, 2026

    @frivoal

    -webkit-user-select is required (for compat) by the spec:

    For compatibility with legacy content, UAs that support user-select must also support -webkit-user-select as an alias.

    If we have evidence that it is not actually needed for compat, we should drop it from the spec AND the tests. Otherwise, it would probably be a good idea to test usage of prefixed and unprefixed separately, so splitting/rewriting the tests would makes sense, but I don't think it's appropriate to just remove the prefixed version from all tests generally.

  6. wpt-interop commented on Feb 12, 2026

    @wpt-interop
    Collaborator

    Thank you for proposing unprefix the -webkit-user-select CSS property for Interop 2026.

    We are pleased to let you know that it has been accepted as part of the Web compat focus area.

    You’ll be able to track progress on this topic throughout the year via the Interop 2026 dashboard.

    Posted on behalf of the Interop team.

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

    Type

    No type

    Projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions