-
Notifications
You must be signed in to change notification settings - Fork 672
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
[css-backgrounds][css3-background] Consider removing the spread distance adjustment for small border radii #1900
Comments
This section was added to create continuity between the shape of the shadow at a border-radius of zero and the shape of a shadow at a border-radius of not-zero. If there's a Web-compat limitation preventing us from implementing it, then we might need to re-evaluate, but if not we do have an interest in improving continuity in behavior for the sake of animations and transitions if nothing else. But also in this case the shadow seems to look more appropriately-shaped if the formula is followed: the curve is seems greatly exaggerated in the shadow otherwise. I can raise it to the WG if you think the situation needs some re-evalutation, though. Lmk~ |
You can also check out the widget at https://drafts.csswg.org/css-backgrounds-3/spread-radius which shows the various options we looked at for the behavior of r between zero and one. |
Interesting! That's a very compelling argument. I have two requests, then:
|
…t for outset shadows; inset shadows don't need it because their radii shrink rather than grow. #1900
OK, I made two fixes (diffs linked above):
Let me know if that works for you! |
I'm confused by this change; the spec defines the meaning of negative spread distance, so it seems like this should still apply for negative spread distances on inner shadows. (I noticed this while reviewing the changes for #675.) |
Since Chrome implemented the change, some authors started complaining about the new behavior. It seems that taking into accound only absolute values of radius and spread without accounting for the size of the element itself (i.e. relative corner radius) breaks authors' expectations in many practical cases, especially large shadows of fully rounded shapes ( Isn't it late to reconsider the adjustment to account for the relative corner radii, e.g. like proposed here? |
https://drafts.csswg.org/css-backgrounds-3/#shadow-shape contains this piece of text:
This seems to have originally been added in this commit: 170e753
Has this been implemented by any browser? Firefox has not implemented it, and judging by the code here and here, Chrome hasn't either.
If there has been no interest from browser vendors, it may be a good idea to remove this section again.
If you decide to keep it, I think the case where the spread amount is negative needs some clarification (and the math may need to be double-checked).
The text was updated successfully, but these errors were encountered: