Chromium Code Reviews| 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 <import src="/sky/framework/sky-element/sky-element.sky" as="SkyElement" /> | |
| 7 <import src="color-sample.sky" /> | |
| 8 | |
| 9 <sky-element name="color-samples"> | |
| 10 <template> | |
| 11 <style> | |
| 12 :host { | |
| 13 display: flex; | |
| 14 } | |
| 15 color-sample { | |
| 16 height: 100%; | |
| 17 flex: 1; | |
| 18 margin-left: 2px; | |
| 19 margin-right: 2px; | |
| 20 } | |
| 21 /* Sadly, last-child doesn't work */ | |
| 22 color-sample:last-child { | |
| 23 border: 1px solid gray; | |
| 24 } | |
|
abarth-chromium
2015/02/04 17:23:51
I'd remove this given that it doesn't work.
hansmuller1
2015/02/04 17:30:32
Good point. I'd only put it there to get some feed
| |
| 25 </style> | |
| 26 <template repeat="{{ colors }}"> | |
| 27 <color-sample color="{{ cssColor }}" /> | |
| 28 </template> | |
| 29 </template> | |
| 30 <script> | |
| 31 module.exports = class extends SkyElement { | |
| 32 created() { | |
| 33 this.colors = []; | |
| 34 } | |
| 35 }.register(); | |
| 36 </script> | |
| 37 </sky-element> | |
| OLD | NEW |