This repository has been archived by the owner on Mar 13, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Correctly fix paths on shimmed, imported styles.
- Loading branch information
Showing
8 changed files
with
61 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,3 @@ | ||
.red { | ||
background: red; | ||
} |
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,3 @@ | ||
.blue { | ||
background: blue; | ||
} |
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,11 @@ | ||
<style sheet shim-shadowdom>@import 'sheet1.css';</style> | ||
|
||
<link rel="stylesheet" href="sheet2.css" shim-shadowdom> | ||
|
||
<style image shim-shadowdom> | ||
.image { | ||
background: url(../assets/google.png); | ||
height: 190px; | ||
width: 538px; | ||
} | ||
</style> |
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,27 @@ | ||
<!doctype html> | ||
<html> | ||
<head> | ||
<title>Imports style loading</title> | ||
<script src="../../../platform.js"></script> | ||
<script src="../../../../tools/test/htmltest.js"></script> | ||
<script src="../../../../tools/test/chai/chai.js"></script> | ||
<link rel="import" href="imports/style-import.html"> | ||
</head> | ||
<body> | ||
<div id="test1" class="red">red</div> | ||
<div id="test2" class="blue">blue</div> | ||
<div id="test3" class="image"></div> | ||
<script> | ||
document.addEventListener('WebComponentsReady', function() { | ||
function getComputed(selector) { | ||
return getComputedStyle(document.querySelector(selector)); | ||
} | ||
|
||
chai.assert.equal(getComputed('#test1').backgroundColor, 'rgb(255, 0, 0)', 'shimmed imported style is loaded'); | ||
chai.assert.equal(getComputed('#test2').backgroundColor, 'rgb(0, 0, 255)', 'shimmed imported sheet is loaded'); | ||
chai.assert.ok(getComputed('#test3').backgroundImage, 'shimmed imported style path is correct'); | ||
done(); | ||
}); | ||
</script> | ||
</body> | ||
</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