Closed Bug 1735575 Opened 3 years ago Closed 1 year ago

Investigate adding aliases for ::-webkit-slider-*

Categories

(Core :: CSS Parsing and Computation, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
117 Branch
Webcompat Priority P2
Tracking Status
firefox117 --- fixed

People

(Reporter: denschub, Assigned: emilio)

References

(Blocks 1 open bug, )

Details

(Keywords: dev-doc-needed)

Attachments

(1 file)

In a recent WebCompat issue, I stumbled across a minor visual glitch caused by a site styling an <input type="range"> with ::-webkit-slider-runnable-track and ::webkit-slider-thumb, but not it's -moz-prefixed counterparts ::-moz-range-track and ::-moz-range-thumb.

I did not look into details, but it appears like the stylings could be fairly compatible to each other. That being said, this is lower on the priority-scale, as I don't recall frequent issues with this.

Summary: Investigate adding aliases for ::-webkit-slider → Investigate adding aliases for ::-webkit-slider-*

Do they really map one to one? We also have ::-moz-range-progress.

See also https://github.com/w3c/csswg-drafts/issues/4410

Flags: needinfo?(dschubert)

I guess they do map 1:1, it's just that -progress allows further customization

Some pseudo-elements do map, but others do not. I think saying that only aliasing some but not others will cause even more weirdness is fair, and given there is potential for an eventual spec resolution, this can also be a WONTFIX for now.

In cases where things are broken, we can also craft interventions that would probably address most of the issues, so we don't have a hard-dependency on engine support here.

I didn't find an existing issue for that, so I figured it's worth filing a new one. I marked this as webcompat-priority P3 because I'm not aware of any significant breakage caused by range input styling. Even if this gets closed as WONTFIX, we can always come back if we discover something critically broken.

Flags: needinfo?(dschubert)

It'd be interesting if you can give the patch a shot and see if it fixes the compat bug you were seeing out of curiosity :)

Flags: needinfo?(dschubert)

Sorry, took me a bit longer to get back to this.

Your patch fixes the compat issue on powerapps.com, it just looks like Chrome with this. I have not tested any other site, but I'm happy to run some tests internally if you'd be interested in that!

Flags: needinfo?(dschubert)

There is a shopping site with an interesting "dual slider" for its price-range filter. It is broken because it disables pointer events on two overlaid sliders, and then enables pointer events on just their thumbs (https://github.com/webcompat/web-bugs/issues/123642). But since it only does the latter with ::-webkit-slider-thumb and doesn't also have ::-moz-range-thumb, the dual-slider ends up being completely non-interactable in Firefox. So not having aliases for at least the thumb is indeed causing webcompat site breakage, not just visual inconsistencies.

Webcompat Priority: P3 → ?
Webcompat Priority: ? → P2

We now have a second site affected by this (see comment 7), and this time it's breaking functionality. I've rebased the attached WIP-patch onto the current central, and was able to confirm that the patch still works and fixes the new issues as well.

Emilio, do you think it's feasible to ship the work-in-progress patch here, or would that require lots of work?

Flags: needinfo?(emilio)

The patch works, but the question remains whether it breaks more stuff than it fixes, due to the pseudo tree being different.

Flags: needinfo?(emilio)

We could maybe enable it on nightly for a while? If that seems fine I'm happy to write the patch.

Flags: needinfo?(dschubert)

Seems like a good approach. We'll keep an eye out for any breakage!

Flags: needinfo?(dschubert)
Flags: needinfo?(emilio)
Flags: needinfo?(emilio)
Assignee: nobody → emilio
Attachment #9245752 - Attachment description: WIP: Bug 1735575 - Add aliases for webkit-slider pseudos. → Bug 1735575 - Add aliases for webkit-slider pseudos. r=#style
Status: NEW → ASSIGNED
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/b9f650869218 Add aliases for webkit-slider pseudos. r=boris
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 117 Branch

While it's a non-standard feature, those two pseudo-elements should still be added to the browser compat data, as ::-moz-range-thumb and ::-moz-range-track are. Note that they were put being the pref layout.css.webkit-range-pseudos.enabled for now.

Sebastian

Keywords: dev-doc-needed
Regressions: 1843040

MDN docs changes can be tracked in the following GitHub issue: https://github.com/mdn/content/issues/28288

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: