Chromium Code Reviews| Index: sky/examples/color/color-samples.sky |
| diff --git a/sky/examples/color/color-samples.sky b/sky/examples/color/color-samples.sky |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..1276f32c13a8566daf63f04a7cf1346bc79b7e3d |
| --- /dev/null |
| +++ b/sky/examples/color/color-samples.sky |
| @@ -0,0 +1,37 @@ |
| +<!-- |
| +// Copyright 2015 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| +--> |
| +<import src="/sky/framework/sky-element/sky-element.sky" as="SkyElement" /> |
| +<import src="color-sample.sky" /> |
| + |
| +<sky-element name="color-samples"> |
| +<template> |
| + <style> |
| + :host { |
| + display: flex; |
| + } |
| + color-sample { |
| + height: 100%; |
| + flex: 1; |
| + margin-left: 2px; |
| + margin-right: 2px; |
| + } |
| + /* Sadly, last-child doesn't work */ |
| + color-sample:last-child { |
| + border: 1px solid gray; |
| + } |
|
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
|
| + </style> |
| + <template repeat="{{ colors }}"> |
| + <color-sample color="{{ cssColor }}" /> |
| + </template> |
| +</template> |
| +<script> |
| +module.exports = class extends SkyElement { |
| + created() { |
| + this.colors = []; |
| + } |
| +}.register(); |
| +</script> |
| +</sky-element> |