CSS angled linear-gradients with very close stops appear very jagged
Categories
(Core :: Graphics: WebRender, defect)
Tracking
()
People
(Reporter: slyacezeta, Unassigned)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
24.72 KB,
image/png
|
Details |
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:123.0) Gecko/20100101 Firefox/123.0
Steps to reproduce:
When making an angled linear-gradient with hard stops, jagged edges appear along the stop. This can be resolved by adjusting the stops to be very close, either by using non-whole percentages (i.e. 9.95% instead of 10%) or adjusting by a single pixel. Compare how the following pen appears in Chrome and Firefox: https://codepen.io/slyacezeta/pen/KKEjPYW
Actual results:
The adjusted stops appear more jagged than the original non-adjusted stops.
Expected results:
The adjusted stops should appear less jagged and more smooth than the original non-adjusted stops.
Comment 2•3 months ago
|
||
Hello I have managed to reproduce the issue with firefox 125.0a1(2024-02-26), 124.0b3 and 123.0 on Ubuntu 22.04 and macOS 12.6 following the STR provided in the description. I will mark this issue as NEW and set a component for this issue in order to get our developers involved and provide a solution for it on further releases.
Have a nice day!
Comment 3•3 months ago
|
||
I can also reproduce this on Stable 123.0 and Nightly 125.0a1 (2024-02-29).
Nical, any ideas what would cause this?
Updated•2 months ago
|
Comment 4•2 months ago
|
||
The gradient shaders evalute the gradients with a single sample. In other words it does not attempt to do anti-aliasing with hard-stops.
Updated•2 months ago
|
Description
•