-
Notifications
You must be signed in to change notification settings - Fork 50
[filter-effects] drop-shadow can accept color before lengths #231
Description
The current spec suggests the color must appear last.
https://drafts.fxtf.org/filter-effects/#funcdef-filter-drop-shadow
drop-shadow() = drop-shadow( <length>{2,3} <color>? )
However, Blink, WebKit and Firefox also accept the color first.
Regardless of the author-supplied order, Blink and WebKit serialize with the color first, and Firefox serializes with the color last.
"drop-shadow(rgb(4, 5, 6) 1px 2px)" becomes "drop-shadow(1px 2px rgb(4, 5, 6))" in Firefox.
"drop-shadow(1px 2px rgb(4, 5, 6))" becomes "drop-shadow(rgb(4, 5, 6) 1px 2px)" in Blink and WebKit.
Only Edge strictly follows the spec here, in requiring color to be last.
We could change the grammar to
drop-shadow() = drop-shadow( [ <length>{2,3} && <color>? ] )
Test PR that should be updated if this proposal is accepted:
web-platform-tests/wpt#7890