Bug 145874 - @supports parse error with the filter property when no parameter is specified
Summary: @supports parse error with the filter property when no parameter is specified
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-10 22:54 PDT by Philippe Wittenbergh
Modified: 2021-09-11 00:42 PDT (History)
4 users (show)

See Also:


Attachments
test case (449 bytes, text/html)
2015-06-10 22:54 PDT, Philippe Wittenbergh
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Philippe Wittenbergh 2015-06-10 22:54:58 PDT
Created attachment 254708 [details]
test case

@supports (filter:blur()) or (-webkit-filter: blur()) { /* do something */ } is parsed as valid by Webkit but not by Firefox (the rules inside the `@supports` block are applied by Webkit nightly builds). Note the missing parameter for the  blur value.

Chromium based browsers appear to suffer from the same issue (tested with Opera 30).

Note: 
1. Webkit handles this correctly for `@supports (transform:scale()) {}` and ignores everything inside the @supports block.
2. -webkit-backdrop-filter: blur() is also affected
Comment 1 Philippe Wittenbergh 2015-06-20 18:25:36 PDT
Well, after multiple readings of the relevant spec [1], I think I’m wrong – and Webkit (+ Blink) is correct.

filter: blur() or filter: grayscale(), etc without a parameter is actually valid per the mentioned spec. The spec mentions - quote (for blur()): “The lacuna value for interpolation is…”. The word ‘lacuna’ apparently refers to ‘missing parameter’. I had to ask two native English speakers for this; the relevant MDN article [2] confirms this reading (“If no parameter is provided, then a value 0 is used”). By extension @supports (filter: blur()) [or other filters] should parse as valid (prefixed atm of course).

[1] http://www.w3.org/TR/filter-effects/#FilterProperty
[2] https://developer.mozilla.org/en-US/docs/Web/CSS/filter
Comment 2 Joonghun Park 2021-09-11 00:42:12 PDT
Per the bug reporter's comment, close this bug as non-issue.