mail-shadow: add x-style experiment

This commit is contained in:
Steve Orvell
2014-10-29 11:33:43 -07:00
parent d6852c87a4
commit 161e7ead3e
3 changed files with 41 additions and 1 deletions

View File

@@ -9,6 +9,21 @@
<script src="../../perf-lib/perf.js"></script>
<x-style name="x-toolbar">
button {
color: red;
}
</x-style>
<x-style name="x-composebar">
#compose {
background-color: yellow;
color: black;
}
</x-style>
<link rel="import" href="src/elements.html">
<link rel="stylesheet" href="src/app.css">
@@ -17,7 +32,9 @@
<script>
//Polymer.log.events = true;
</script>
</script>
</head>
<body fullbleed vertical layout>

View File

@@ -1,3 +1,4 @@
<link rel="import" href="x-style.html">
<link rel="import" href="x-item.html">
<link rel="import" href="x-label.html">
<link rel="import" href="x-contact-item.html">

View File

@@ -0,0 +1,22 @@
<script>
(function() {
window.XStyles = {};
Polymer({
name: 'x-style',
created: function() {
this.style.display = 'none';
var name = this.getAttribute('name');
if (name) {
XStyles[name] = XStyles[name] || [];
XStyles[name].push(this);
}
}
});
})();
</script>