New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[filter-effects] Are blur parameters to drop-shadow() specifying a "blur radius" or a standard deviation #102

Closed
fsoder opened this Issue Jan 2, 2017 · 6 comments

Comments

Projects
None yet
6 participants
@fsoder
Collaborator

fsoder commented Jan 2, 2017

The section defining the drop-shadow() function [1] states that

Values are interpreted as for box-shadow [CSS3BG].

which would seem to imply that the blur parameter is a "blur radius". However it also references [2] as a supposedly equivalent description using the <feDropShadow> element, suggesting that the blur parameter would be specified as a standard deviation. One of these references ought to be incorrect.

[1] https://drafts.fxtf.org/filters/#funcdef-filter-drop-shadow
[2] https://drafts.fxtf.org/filters/#dropshadowEquivalent

@longsonr

This comment has been minimized.

Show comment
Hide comment
@longsonr

longsonr Mar 1, 2017

The blur parameter should be the same as for feDropShadow and the same as for feGaussianBlur, anything else would be inconsistent and for feGaussianBlur not backwards compatible so I think the specification text needs to change not to mention box-shadow.

longsonr commented Mar 1, 2017

The blur parameter should be the same as for feDropShadow and the same as for feGaussianBlur, anything else would be inconsistent and for feGaussianBlur not backwards compatible so I think the specification text needs to change not to mention box-shadow.

@smfr

This comment has been minimized.

Show comment
Hide comment
@smfr

smfr Mar 1, 2017

Agreed; drop-shadow() should match SVG, not box-shadow (see the bottom of https://dbaron.org/log/20110225-blur-radius).

smfr commented Mar 1, 2017

Agreed; drop-shadow() should match SVG, not box-shadow (see the bottom of https://dbaron.org/log/20110225-blur-radius).

@AmeliaBR

This comment has been minimized.

Show comment
Hide comment
@AmeliaBR

AmeliaBR May 22, 2017

Has anyone tested what browsers are doing?

I'm pretty sure that authors are going to expect drop-shadow(0 0 5px blue) to behave like box-shadow: 0 0 5px blue.

AmeliaBR commented May 22, 2017

Has anyone tested what browsers are doing?

I'm pretty sure that authors are going to expect drop-shadow(0 0 5px blue) to behave like box-shadow: 0 0 5px blue.

@fsoder

This comment has been minimized.

Show comment
Hide comment
@fsoder

fsoder May 22, 2017

Collaborator

If what I wrote in [1] is true, Blink and Gecko have it as a standard deviation, and based on the reporters statement WebKit/Safari interpret it like box-shadow. Author expectation is the latter based on that bug.

[1] https://bugs.chromium.org/p/chromium/issues/detail?id=677689

Collaborator

fsoder commented May 22, 2017

If what I wrote in [1] is true, Blink and Gecko have it as a standard deviation, and based on the reporters statement WebKit/Safari interpret it like box-shadow. Author expectation is the latter based on that bug.

[1] https://bugs.chromium.org/p/chromium/issues/detail?id=677689

@dirkschulze

This comment has been minimized.

Show comment
Hide comment
@dirkschulze

dirkschulze Jun 8, 2017

Contributor

I created an example: https://codepen.io/anon/pen/pwjYOQ

Safari, Chrome and Firefox treat the value of blur and drop-shadow as standard deviation. At this point I don't think it is reasonable to change this. Especially since the filter properties are un-prefixed. I will change the spec text to be more clear and add a note that this is different to box-shadow.

Contributor

dirkschulze commented Jun 8, 2017

I created an example: https://codepen.io/anon/pen/pwjYOQ

Safari, Chrome and Firefox treat the value of blur and drop-shadow as standard deviation. At this point I don't think it is reasonable to change this. Especially since the filter properties are un-prefixed. I will change the spec text to be more clear and add a note that this is different to box-shadow.

@AmeliaBR

This comment has been minimized.

Show comment
Hide comment
@AmeliaBR

AmeliaBR Jun 8, 2017

Confirm that Edge does the same. Safari must have changed their implementation to match (or maybe treats -webkit-filter differently from filter).

So I agree that the spec might as well be consistent with implementations, but we'll need a clear definition of the properties in this spec, and a warning that they don't match box/text-shadow.

AmeliaBR commented Jun 8, 2017

Confirm that Edge does the same. Safari must have changed their implementation to match (or maybe treats -webkit-filter differently from filter).

So I agree that the spec might as well be consistent with implementations, but we'll need a clear definition of the properties in this spec, and a warning that they don't match box/text-shadow.

dirkschulze added a commit that referenced this issue Dec 24, 2017

[filter-effects] Clarify that there is a difference between blur radi…
…us and standard deviation. Relax syntax of drop-shadow. Issues #102 #231
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment