Inconsistent border rendering on rounded elements when color is implicit vs explicit
Categories
(Core :: Web Painting, defect, P3)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox147 | --- | fixed |
People
(Reporter: leeroyjenkins176, Assigned: emilio)
Details
Attachments
(2 files)
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:145.0) Gecko/20100101 Firefox/145.0
Steps to reproduce:
Summary:
Firefox shows a visual difference in border rendering on rounded elements (border-radius: 50%) depending on how the color is specified. When using border: 10px solid (without explicit color) or border: 10px solid currentcolor, the border has a slight shadow/blur effect of ~1px. When using border: 10px solid #fff (or any explicitly specified color), this effect is absent.
<style>
div {
display: block;
width: 51px;
height: 51px;
border-radius: 50%;
background-color: #323232;
}
:root {
--color: #fff;
background: var(--color);
color: var(--color);
}
.demo-1 {
border: 10px solid;
}
.demo-2 {
border: 10px solid currentcolor;
}
.demo-3 {
border: 10px solid var(--color);
}
</style>
<div class="demo-1"></div>
<div class="demo-2"></div>
<div class="demo-3"></div>
https://codepen.io/coyibe2003/pen/ogxjBqN
Actual results:
.demo-1 and .demo-2 have a visible shadow/blur effect on the border (~1px)
.demo-3 looks without this effect
Expected results:
Border rendering should be identical since the final computed color is the same (#fff in all cases).
| Reporter | ||
Updated•3 months ago
|
Comment 1•3 months ago
|
||
The severity field is not set for this bug.
:jwatt, could you have a look please?
For more information, please visit BugBot documentation.
| Assignee | ||
Comment 2•3 months ago
|
||
The explanation is here: https://searchfox.org/firefox-main/rev/5ccf4a7d77a329f237d3a41e400049f9c47dc71f/layout/painting/nsCSSRendering.cpp#1966-1969
We should be able to plumb the right foreground color there tho.
| Assignee | ||
Updated•3 months ago
|
| Assignee | ||
Comment 3•3 months ago
|
||
Updated•3 months ago
|
| Assignee | ||
Updated•3 months ago
|
Comment 7•3 months ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/15510701bff7
https://hg.mozilla.org/mozilla-central/rev/ba684b36094f
Updated•2 months ago
|
Description
•