WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
24880
image overflows the border when using border-radius
https://bugs.webkit.org/show_bug.cgi?id=24880
Summary
image overflows the border when using border-radius
Pavol Rusnak
Reported
2009-03-27 04:08:07 PDT
The behaviour and the workaround is described here:
http://stick.gk2.sk/blog/2009/03/image-with-rounded-corners-using-css3/
I'm attaching the testcase. Also I'm not sure if the behaviour is a bug or a feature according to CSS 3 specification.
Attachments
testcase
(16.90 KB, application/bzip2)
2009-03-27 04:08 PDT
,
Pavol Rusnak
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Pavol Rusnak
Comment 1
2009-03-27 04:08:32 PDT
Created
attachment 29007
[details]
testcase
Pavol Rusnak
Comment 2
2009-03-27 04:14:19 PDT
issue also reported here:
https://bugzilla.mozilla.org/show_bug.cgi?id=485501
https://bugs.kde.org/show_bug.cgi?id=188242
Dave Hyatt
Comment 3
2009-03-27 10:46:48 PDT
This was fixed recently.
Nathan Vander Wilt
Comment 4
2009-06-06 16:12:56 PDT
Can this be reopened? I'm testing image corner rounding in last night's nightly and noticed that while an image without a border now rounds nicely, if I add a border things get icky. The image is getting clipped to the outside of the border, rather than the inside. This means either the image still has square corners showing (if the border is thicker than the radius) or the border gets drawn over by the image (if the border is thinner than the radius). Compare: <img style="-webkit-border-radius:10px;" src="
http://upload.wikimedia.org/wikipedia/commons/thumb/2/29/Solid_green.svg/200px-Solid_green.svg.png
"> - and - <img style="-webkit-border-radius:50px; border: 5px solid black" src="
http://upload.wikimedia.org/wikipedia/commons/thumb/2/29/Solid_green.svg/200px-Solid_green.svg.png
"> To: <img style="-webkit-border-radius:10px; border: 5px solid black" src="
http://upload.wikimedia.org/wikipedia/commons/thumb/2/29/Solid_green.svg/200px-Solid_green.svg.png
"> -and- <img style="-webkit-border-radius:50px;" src="
http://upload.wikimedia.org/wikipedia/commons/thumb/2/29/Solid_green.svg/200px-Solid_green.svg.png
"> I'd expect the image edge to always follow the inside of the border, as the workaround in the OP's link shows. (Caveat: I'm not a CSS guru, so maybe the standard requires clipping to the outside edge of the border, though I hope not as this is terribly ugly.)
Chris Hills
Comment 5
2009-08-15 06:53:48 PDT
I would request that this bug be reopened also as the fix is incomplete due to the incorrect clipping.
Lea Verou
Comment 6
2011-03-09 16:03:44 PST
I would also request this to be reopened. It appears that even though Webkit now clips the image according to border-radius, it clips it to the border box and not the content box, as the spec dictates: "The content of replaced elements is always trimmed to the content edge curve." (
http://www.w3.org/TR/css3-background/#corner-clipping
)
j.j.
Comment 7
2012-07-18 15:10:58 PDT
> I would also request this to be reopened
I think this is coverd by
bug 83206
?
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug