OLD | NEW |
| (Empty) |
1 <!-- | |
2 // Copyright 2015 The Chromium Authors. All rights reserved. | |
3 // Use of this source code is governed by a BSD-style license that can be | |
4 // found in the LICENSE file. | |
5 --> | |
6 <template> | |
7 <style> | |
8 :host([level="1"]) { | |
9 box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24); | |
10 } | |
11 :host([level="2"]) { | |
12 box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23); | |
13 } | |
14 :host([level="3"]) { | |
15 box-shadow: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23); | |
16 } | |
17 :host([level="4"]) { | |
18 box-shadow: 0 14px 28px rgba(0,0,0,0.25), 0 10px 10px rgba(0,0,0,0.22); | |
19 } | |
20 :host([level="5"]) { | |
21 box-shadow: 0 19px 38px rgba(0,0,0,0.30), 0 15px 12px rgba(0,0,0,0.22); | |
22 } | |
23 </style> | |
24 </template> | |
25 <script> | |
26 import "dart:sky"; | |
27 | |
28 HTMLStyleElement _kStyleElement; | |
29 | |
30 void applyTo(ShadowRoot shadowRoot) { | |
31 shadowRoot.appendChild(_kStyleElement.cloneNode(deep: true)); | |
32 } | |
33 | |
34 _init(script) { | |
35 HTMLTemplateElement template = script.owner.querySelector('template'); | |
36 _kStyleElement = template.content.querySelector('style'); | |
37 } | |
38 </script> | |
39 </sky-element> | |
OLD | NEW |