mirror of
https://github.com/Polymer/polymer.git
synced 2025-02-25 18:55:30 -06:00
mail-shadow: add x-style experiment
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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">
|
||||
|
||||
22
projects/mail-shadow/elements/x-style.html
Normal file
22
projects/mail-shadow/elements/x-style.html
Normal 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>
|
||||
Reference in New Issue
Block a user