Skip to content

Commit

Permalink
#649 Reinstate support for inherit in background props
Browse files Browse the repository at this point in the history
With WIP test.
  • Loading branch information
danfickle committed Feb 14, 2021
1 parent a27b3a1 commit f821644
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ public List<PropertyDeclaration> buildDeclarations(
if (val.getCssValueType() != CSSValue.CSS_INHERIT) {
res = Collections.singletonList(processValue(cssName, val));
} else {
res = Collections.singletonList(val);
return Collections.singletonList(
new PropertyDeclaration(cssName, val, important, origin));
}
} else {
res =
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<html>
<head>
<style>
@page {
size: 400px 400px;
margin: 10px;
}
body {
margin: 10px;
max-width: 360px;
}
#one {
height: 300px;
background-image: url(../../demos/images/cc0-cat.png), url(../../demos/images/flyingsaucer.png), none;
background-repeat: no-repeat;
border: 1px solid blue;
}
#two {
height: 100px;
border: 1px solid red;
background-image: inherit;
}

</style>
</head>
<body>
<div id="one">
<div id="two"></div>
</div>

</body>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -1383,6 +1383,15 @@ public void testIssue649MultipleBgImages() throws IOException {
assertTrue(vt.runTest("issue-649-multiple-bg-images"));
}

/**
* Tests that the other background-* properties allow multiple values.
*/
@Test
@Ignore // WIP
public void testIssue649MultipleBgImagesAdvanced() throws IOException {
assertTrue(vt.runTest("issue-649-multiple-bg-images-advanced"));
}

// TODO:
// + Elements that appear just on generated overflow pages.
// + content property (page counters, etc)
Expand Down

0 comments on commit f821644

Please sign in to comment.