diff options
-rw-r--r-- | x-gdbar.html | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/x-gdbar.html b/x-gdbar.html index 81db557..c9cff9c 100644 --- a/x-gdbar.html +++ b/x-gdbar.html | |||
@@ -69,7 +69,20 @@ aside img { | |||
69 | aside.active { | 69 | aside.active { |
70 | background-size: 100% 100%; | 70 | background-size: 100% 100%; |
71 | } | 71 | } |
72 | |||
73 | /*.current :host aside { | ||
74 | |||
75 | }*/ | ||
76 | </style> | ||
77 | <!--<style> | ||
78 | /* When :host starts working us above. Until then we're stuck with this. | ||
79 | in an unscoped style. */ | ||
80 | .current aside[is=x-gdbar] aside { | ||
81 | background-size: 100% 100%; | ||
82 | opacity: 0; | ||
83 | } | ||
72 | </style> | 84 | </style> |
85 | --> | ||
73 | <aside> | 86 | <aside> |
74 | <img src="images/google_developers_icon_128.png"> | 87 | <img src="images/google_developers_icon_128.png"> |
75 | </aside> | 88 | </aside> |
@@ -81,6 +94,7 @@ this.lifecycle({ | |||
81 | created: function(root) { | 94 | created: function(root) { |
82 | shadowRoot = root; | 95 | shadowRoot = root; |
83 | }, | 96 | }, |
97 | // TODO: use css :host selector instead of doing this in JS. | ||
84 | attributeChanged: function(name, oldValue, newValue) { | 98 | attributeChanged: function(name, oldValue, newValue) { |
85 | if (name == 'class') { | 99 | if (name == 'class') { |
86 | shadowRoot.querySelector('aside').className = newValue; | 100 | shadowRoot.querySelector('aside').className = newValue; |