Closed
Bug 1310431
Opened 9 years ago
Closed 9 years ago
CSS filter whole property will be considered as invalid if one of the function has no parameter
Categories
(Core :: CSS Parsing and Computation, defect, P3)
Core
CSS Parsing and Computation
Tracking
()
RESOLVED
INVALID
People
(Reporter: fireattack, Unassigned)
References
Details
(Whiteboard: [parity-chrome])
User Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.59 Safari/537.36
Steps to reproduce:
https://jsfiddle.net/muavjbvs/7/
Actual results:
The whole filter is ignored. It says "invalid property value" in dev tool as well.
Expected results:
According to MDN (https://developer.mozilla.org/en-US/docs/Web/CSS/filter#sepia()_2 ): "If the ‘amount’ parameter is missing, a value of 0 is used." So the opacity part should still take effect.
It's not limited to sepia either. Most of (if not all) the functions without parameter will break filter property.
In general, it is expected that invalid syntax makes a property value invalid.
I also don't see anything in https://drafts.fxtf.org/filters/#funcdef-filter-sepia that says that the parameter to the filter function can be omitted, although perhaps I'm missing something.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → INVALID
(Do other implementations behave the same?)
![]() |
Reporter | |
Comment 3•9 years ago
|
||
(In reply to David Baron :dbaron: ⌚️UTC-7 from comment #2)
> (Do other implementations behave the same?)
Chrome is not the same at least
![]() |
Reporter | |
Comment 4•9 years ago
|
||
If it's not a bug, should I edit MDN to reflect by the way?
Comment 5•9 years ago
|
||
I've fixed MDN to match the CSS filters specification. You're not allowed to miss values out. The defaults are only applicable if we need to infer a missing filter for interpolation purposes.
![]() |
Reporter | |
Comment 6•9 years ago
|
||
Thanks!
Comment 7•9 years ago
|
||
Ah, my fault. I thougt [] is optional but apparently it only means grouping.
Comment 8•8 years ago
|
||
Hi Mike, this is something Blink behaves different from gecko for handling CSS filter values, eg. sepia(). So far there is no end-user facing issue reported here, what's your recommendation to deal with this issue ? Report to webcompat.com or just issue a bug on corresponding browser vendor bug management system ?
Flags: needinfo?(miket)
Priority: -- → P3
Whiteboard: [parity-chrome]
Updated•8 years ago
|
Comment 9•8 years ago
|
||
Based on [1], it's a regression bug from Chrome 53. I believe Chrome team will fix it soon.
[1] https://bugs.chromium.org/p/chromium/issues/detail?id=664866#c1
Flags: needinfo?(miket)
Comment 10•8 years ago
|
||
(sounds good!)
You need to log in
before you can comment on or make changes to this bug.
Description
•