Skip to content

Commit

Permalink
Corrected background-size-04[1-4] according to review
Browse files Browse the repository at this point in the history
  • Loading branch information
TalbotG committed Nov 24, 2020
1 parent c5dfeeb commit 10385a2
Show file tree
Hide file tree
Showing 9 changed files with 34 additions and 129 deletions.
7 changes: 4 additions & 3 deletions css/css-backgrounds/background-size-041.html
Expand Up @@ -33,13 +33,14 @@
<style>
div
{
background-clip: content-box; /* border-box is the initial background-clip value */
background-clip: border-box;
background-image: linear-gradient(orange, blue);
background-origin: border-box; /* padding-box is the initial background-origin value */
background-origin: content-box;
background-position: center;
background-repeat: no-repeat;
background-size: 200px auto;
border: black solid 40px;
border: solid 40px;
border-color: transparent black;
height: 400px;
width: 400px;
}
Expand Down
9 changes: 5 additions & 4 deletions css/css-backgrounds/background-size-042.html
Expand Up @@ -25,21 +25,22 @@
-->

<link rel="match" href="reference/background-size-042-ref.html">
<link rel="match" href="reference/background-size-041-ref.html">

<meta content="" name="flags">
<meta content="This test checks that when one 'background-size' is 'auto' and the image has no intrinsic size and no intrinsic ratio, then it should use 100%. In this test, the 'auto' value should use 100% of the height of the background positioning area of the div, which is 400px." name="assert">

<style>
div
{
background-clip: content-box; /* border-box is the initial background-clip value */
background-clip: border-box;
background-image: linear-gradient(orange, blue);
background-origin: border-box; /* padding-box is the initial background-origin value */
background-origin: content-box;
background-position: center;
background-repeat: no-repeat;
background-size: 50% auto;
border: black solid 40px;
border: solid 40px;
border-color: transparent black;
height: 400px;
width: 400px;
}
Expand Down
7 changes: 4 additions & 3 deletions css/css-backgrounds/background-size-043.html
Expand Up @@ -33,13 +33,14 @@
<style>
div
{
background-clip: content-box; /* border-box is the initial background-clip value */
background-clip: border-box;
background-image: url("support/orange-intrinsic-none.svg");
background-origin: border-box; /* padding-box is the initial background-origin value */
background-origin: content-box;
background-position: center;
background-repeat: no-repeat;
background-size: 200px auto;
border: black solid 40px;
border: solid 40px;
border-color: transparent black;
height: 400px;
width: 400px;
}
Expand Down
9 changes: 5 additions & 4 deletions css/css-backgrounds/background-size-044.html
Expand Up @@ -25,21 +25,22 @@
-->

<link rel="match" href="reference/background-size-044-ref.html">
<link rel="match" href="reference/background-size-043-ref.html">

<meta content="" name="flags">
<meta content="This test checks that when one 'background-size' is 'auto' and the image has no intrinsic size and no intrinsic ratio, then it should use 100%. In this test, the 'auto' value should use 100% of the height of the background positioning area of the div, which is 400px." name="assert">

<style>
div
{
background-clip: content-box; /* border-box is the initial background-clip value */
background-clip: border-box;
background-image: url("support/orange-intrinsic-none.svg");
background-origin: border-box; /* padding-box is the initial background-origin value */
background-origin: content-box;
background-position: center;
background-repeat: no-repeat;
background-size: 50% auto;
border: black solid 40px;
border: solid 40px;
border-color: transparent black;
height: 400px;
width: 400px;
}
Expand Down
37 changes: 7 additions & 30 deletions css/css-backgrounds/reference/background-size-041-ref.html
Expand Up @@ -5,45 +5,22 @@
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/">

<style>
div#black-border
div#black-walls
{
border: black solid 40px;
border: solid 40px;
border-color: transparent black;
height: 400px;
width: 400px;
}

div#gradient
{
background-image: linear-gradient(orange, blue);
height: 120%; /* computes to 480px */
margin: -40px auto 0px;
/* the gradient block is horizontally centered inside div#black-border */
height: 100%; /* computes to 400px */
margin: 0px auto;
/* the gradient block is horizontally centered inside div#black-walls */
width: 200px;
}

div#mask1 , div#mask2
{
background-color: black;
height: 40px;
left: 8px;
position: absolute;
width: 480px;
}

div#mask1
{
top: 8px;
}

div#mask2
{
top: 448px; /* 8px + 40px + 400px */
}

</style>

<div id="black-border"><div id="gradient"></div></div>

<div id="mask1"></div>

<div id="mask2"></div>
<div id="black-walls"><div id="gradient"></div></div>
49 changes: 0 additions & 49 deletions css/css-backgrounds/reference/background-size-042-ref.html

This file was deleted.

16 changes: 8 additions & 8 deletions css/css-backgrounds/reference/background-size-043-ref.html
Expand Up @@ -5,23 +5,23 @@
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/">

<style>
div#black-border
div#black-walls
{
border: black solid 40px;
border: solid 40px;
border-color: transparent black;
height: 400px;
width: 400px;
}

div#inner-orange
{
background-color: orange;
border-left: blue solid 16px;
border-right: blue solid 16px;
height: 100%;
border: blue solid 16px;
height: 368px; /* 400px - 2 * 16px == 368px */
margin: 0px auto;
/* the orange block is horizontally centered inside div#black-border */
width: 168px; /* 200 - 32 == 168 */
/* the orange block is horizontally centered inside div#black-walls */
width: 168px; /* 200px - 2 * 16px == 168px */
}
</style>

<div id="black-border"><div id="inner-orange"></div></div>
<div id="black-walls"><div id="inner-orange"></div></div>
27 changes: 0 additions & 27 deletions css/css-backgrounds/reference/background-size-044-ref.html

This file was deleted.

2 changes: 1 addition & 1 deletion css/css-backgrounds/support/orange-intrinsic-none.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 10385a2

Please sign in to comment.