Chromium Code Reviews| Index: sky/examples/layout/basic.sky |
| diff --git a/sky/examples/layout/basic.sky b/sky/examples/layout/basic.sky |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..33496444f6aeaf8b66e96c913836058325159f61 |
| --- /dev/null |
| +++ b/sky/examples/layout/basic.sky |
| @@ -0,0 +1,20 @@ |
| +<parent style='background-color: lightblue;'> |
| + <child style='background-color: pink;' /> |
| +</parent> |
| +<script> |
| +import 'dart:sky'; |
| + |
| +void main() { |
| + var parent = document.querySelector('parent'); |
| + parent.setLayoutManager(() { |
| + parent.width = 200.0; |
| + parent.height = 100.0; |
| + |
| + var child = document.querySelector('child'); |
| + child.x = 100.0; |
| + child.y = 50.0; |
| + child.width = 100.0; |
| + child.height = 50.0; |
| + }); |
| +} |
| +</script> |
|
abarth-chromium
2015/03/25 00:18:51
Can we make this into a test rather than an exampl
ojan
2015/04/02 00:02:29
Good point. This should be easy to test. I was jus
|