Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Correct edge case for background color clip
Use the color clip corresponding to the last background-image instead of the last background-clip. (There may be more clips than images and clips are repeated if there are less clips than images.) Add a test.
- Loading branch information
Showing
4 changed files
with
66 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
tests/wpt/web-platform-tests/css/css-backgrounds/background-color-clip.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<!DOCTYPE html> | ||
<meta charset="utf-8"> | ||
<title>Background Color Clip</title> | ||
<link rel="match" href="reference/background-color-clip.html"> | ||
<link rel="help" href="https://drafts.csswg.org/css-backgrounds-3/#background-color"> | ||
<meta name="assert" content="Check that the background color is clipped according to the background-clip value associated with the bottom-most background image layer."> | ||
<style> | ||
div { | ||
width: 120px; | ||
height: 100px; | ||
background-color: green; | ||
background-clip: border-box, content-box, border-box; | ||
background-image: none, none; | ||
border-style: solid; | ||
border-width: 10px; | ||
border-color: transparent; | ||
} | ||
</style> | ||
<div></div> |
15 changes: 15 additions & 0 deletions
15
tests/wpt/web-platform-tests/css/css-backgrounds/reference/background-color-clip.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<!DOCTYPE html> | ||
<meta charset="utf-8"> | ||
<title>Green Rectangle</title> | ||
<style> | ||
div { | ||
width: 120px; | ||
height: 100px; | ||
background-color: green; | ||
background-clip: content-box; | ||
border-style: solid; | ||
border-width: 10px; | ||
border-color: transparent; | ||
} | ||
</style> | ||
<div></div> |