Bug 77572
Summary: | content inside element with border-radius is not clipped to border-radius when overflow: hidden is set. | ||
---|---|---|---|
Product: | WebKit | Reporter: | Dan Ionut Dumitriu <ionut90ro> |
Component: | CSS | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED CONFIGURATION CHANGED | ||
Severity: | Major | CC: | 7raivis, ahmad.saleem792, ap, bfulgham, bmcouto, gabriel.schulhof, idoros, jaepark, mrwolfgraphics, rniwa, robin.webkit, shanestephens, simon.fraser, zalan |
Priority: | P1 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | PC | ||
OS: | Windows 7 | ||
URL: | http://jsfiddle.net/CTS36/7/ |
Dan Ionut Dumitriu
Image is not cropped by the border-radius of the parent element.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Shane Stephens
http://www.w3.org/TR/css3-background/#corner-clipping
"A box's backgrounds, but not its border-image, are clipped to the appropriate curve (as determined by ‘background-clip’). Other effects that clip to the border or padding edge (such as ‘overflow’ other than ‘visible’) also must clip to the curve. The content of replaced elements is always trimmed to the content edge curve."
Shane Stephens
*** Bug 81494 has been marked as a duplicate of this bug. ***
Shane Stephens
*** Bug 80162 has been marked as a duplicate of this bug. ***
Gabriel Schulhof
<html>
<head>
<title>Clipping Bug</title>
<style>
.rounded-corners {
position: relative;
width: 120px;
height: 80px;
border: 10px solid black;
border-radius: 30px;
overflow: hidden;
}
.inner-box {
position: absolute;
width: 50px;
height: 50px;
background: red;
left: -20px;
top: -20px;
}
</style>
</head>
<body>
<div class="rounded-corners">
<div class="inner-box"></div>
</div>
</body>
</html>
Gabriel Schulhof
The previous illustrates the bug.
Gabriel Schulhof
My platform is Linux i386 running Google Chrome 17.0.963.83 ...
Binyamin
Still not solved on Chrome 22.0.1217.0 canary.
Ido Rosenthal
same bug as #72619.. please fix it
Bruno Couto
Still present on Safari for IOS8 and OS X 10.10 Yosemite. Please fix this ASAP
Ahmad Saleem
I took test case from Comment 04 and changed it into JSFiddle below:
Link - https://jsfiddle.net/seojxdn4/show
I am not able to reproduce this bug in above test case and it renders same across all browsers (Safari 15.6, Chrome Canary 106 and Firefox Nightly 105 on macOS 12.5).
Plus now image is cropped by border-radius - I have updated URL based JSfiddle to below:
Link - https://jsfiddle.net/Lwrca4je/1/show
It is working as intended across all browsers. I think this is fixed along the way and this can be marked as "RESOLVED CONFIGURATION CHANGED". Thanks!