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 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add @polyfill-rule polyfill styles; helps address issue #36
- Loading branch information
Showing
3 changed files
with
67 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<!DOCTYPE html> | ||
<!-- | ||
Copyright 2013 The Polymer Authors. All rights reserved. | ||
Use of this source code is governed by a BSD-style | ||
license that can be found in the LICENSE file. | ||
--> | ||
<html> | ||
<head> | ||
<title>Psuedo scoped styling</title> | ||
<script src="../../../platform.js" shadow></script> | ||
<script src="register.js"></script> | ||
<script src="../../../tools/test/htmltest.js"></script> | ||
<script src="../../../node_modules/chai/chai.js"></script> | ||
</head> | ||
<body> | ||
<x-foo> | ||
<div class="zonk">red?</div> | ||
</x-foo> | ||
|
||
<template id="x-foo""> | ||
<style> | ||
/* @polyfill-rule .zonk { | ||
background: red; | ||
} */ | ||
|
||
</style> | ||
<content></content> | ||
</template> | ||
|
||
<script> | ||
XFoo = register('x-foo', '', HTMLElement.prototype, ['x-foo']); | ||
|
||
document.addEventListener('WebComponentsReady', function() { | ||
setTimeout(function() { | ||
var foo = document.querySelector('x-foo'); | ||
fooDiv = foo.firstElementChild; | ||
chai.assert.equal(getComputedStyle(fooDiv).backgroundColor, | ||
'rgb(255, 0, 0)', '@polyfill styles are applied'); | ||
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