inherit not working in css var function fallback
Categories
(Core :: CSS Parsing and Computation, defect)
Tracking
()
People
(Reporter: adjenks, Assigned: emilio)
References
()
Details
Attachments
(1 file)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:66.0) Gecko/20100101 Firefox/66.0
Steps to reproduce:
Use the css var() function and use inherit as a fallback.
E.g.:
.aClass {
/doesn't work anywhere/
background-color: var(--undeclared-var, inherit);
/*works on Chrome and not Fiferox */
border:var(--undeclared-var, inherit);
}
Detailed examples with markup are seen here:
https://stackoverflow.com/questions/55271116/is-this-a-browser-bug-inheritence-in-variables-with-background-color
Actual results:
It does not inherit the properties.
Expected results:
Tags with the class should inherit the properties of the parent tags when inherit is specified as a fallback.
I understand that custom properties are still in the draft phase, but I think I should still point out what I believe to be unwanted browser behavior.
You'll also notice that in the examples on stackoverflow different browsers will behave differently.
Comment 1•6 years ago
|
||
Hi Adjenks, Can you please provide an HTML doc with the code that showcases this issue in order for us to reproduce it as well, or maybe the code we could copy into a Text editor and save it as HTML ? I'll set the component for this issue to CSS Parsing and Computations.
You can also try our latest Nightly build and see if the same issue occurs there as well. You can find it here: https://nightly.mozilla.org/
Updated•6 years ago
|
Assignee | ||
Comment 2•6 years ago
|
||
The URL in the bug description shows a border in Chrome, doesn't in Gecko. Not sure what's the expected behavior per spec, will check.
Assignee | ||
Comment 3•6 years ago
|
||
Yeah, I don't see any reason why this shouldn't work.
Assignee | ||
Comment 4•6 years ago
|
||
WebKit and Blink also are bogus in the area:
Assignee | ||
Comment 5•6 years ago
|
||
Comment 7•6 years ago
|
||
bugherder |
Wow! You were very quick at producing a fix. I am impressed. Good work.
Comment 9•6 years ago
|
||
Hi This issue is Verified as Fixed in our Firefox Nightly 68.0a1 (2019-04-23) (64-bit).
However this issue still occurs in Beta and Release.
Updated•6 years ago
|
Updated•6 years ago
|
Description
•