Files
sousa-gecko/testing/web-platform/tests/css/css-backgrounds/border-image-slice-005.htm
T
Simon Fraser 65582d1a9b Bug 2046320 [wpt PR 60512] - Upstream fuzzy annotations from WebKit changes in css/css-backgrounds, a=testonly
Automatic update from web-platform-tests
Upstream fuzzy annotations from WebKit changes in `css/css-backgrounds` (#60512)

The following webkit revisions updated fuzzy annotations in css/css-backgrounds, so upstream them:

304621@main
306349@main
305533@main

60af735 clobbered fuzziness in css/css-backgrounds/border-image-repeat-round.html so restore that.
--

wpt-commits: 26dddb73aa42c4eeab2d41c4039afb9f9d65ba46
wpt-pr: 60512
2026-06-11 08:50:09 +00:00

53 lines
2.4 KiB
HTML

<!DOCTYPE html>
<meta charset="UTF-8">
<title>CSS Test: The 'border-image-slice' property with four percentage values</title>
<link rel="author" title="Microsoft" href="http://www.microsoft.com/">
<!--
Test rehabilitated by Gérard Talbot
2020-05-27 and 2020-09-28
-->
<link rel="help" href="http://www.w3.org/TR/css3-background/#the-border-image-slice">
<link rel="match" href="reference/border-image-slice-005-ref.html">
<meta name="fuzzy" content="maxDifference=0-102;totalPixels=0-5316">
<meta name="assert" content="This test checks that the border image is sliced into nine regions with inward offsets, '40%' from the top, '30%' from the right,'20%' from the bottom, and '10%' from the left edges of the image. Percentages are relative to the size of the image: the width of the image for the horizontal offsets, the height for vertical offsets.">
<style>
div
{
background-color: orange;
border-color: red;
border-style: double;
border-width: 40px;
border-image-slice: 40% 30% 20% 10%;
/*
The original test was using 'border-image-slice: 40% 15% 20% 5%'.
*/
border-image-source: url("support/9grid40-30-20-10-red.png");
/*
The top side uses 3 blue borders of 24px wide interleaved with 2
transparent areas of 24px wide.
So: 5 times 24px == 120px which is 40% of 300px
The right side uses 3 blue borders of 18px wide interleaved with 2
transparent areas of 18px wide.
So: 5 times 18px == 90px which is 30% of 300px
The bottom side uses 3 blue borders of 4px wide interleaved with 2
transparent areas of 12px wide.
So: 5 times 12px == 60px which is 20% of 300px
The left side uses 3 blue borders of 6px wide interleaved with 2
transparent areas of 6px wide.
So: 5 times 6px == 30px which is 10% of 300px
*/
height: 100px;
margin: 50px;
width: 200px;
}
</style>
<p>Test passes if there is a filled orange rectangle inside 3 blue borders interleaved with 2 orange borders and <strong>no red</strong>.
<div></div>