Skip to content
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.

Commit

Permalink
misc
Browse files Browse the repository at this point in the history
  • Loading branch information
sorvell committed Nov 7, 2013
1 parent 7fd6a92 commit d391ba4
Show file tree
Hide file tree
Showing 2 changed files with 141 additions and 0 deletions.
47 changes: 47 additions & 0 deletions sorvell/calllbacks/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<!doctype html>
<html>
<head>
<script src="../../../polymer/polymer.js"></script>
</head>
<body>
<polymer-element name="x-item">
<template>
<style>
:host(.ready) {
color: red;
}
</style>
<content></content>
</template>
<script>
Polymer('x-item', {
ready: function() {
console.log('ready', this);
this.classList.add('ready');
},
enteredView: function() {
console.log('enteredView');
}
});
</script>
</polymer-element>
<polymer-element name="x-repeat">
<template>
<template repeat="{{items}}">
<x-item>{{}}</x-item>
</template>
<x-item>not repeat</x-item>
<template if="{{ifItem}}">
<x-item>if</x-item>
</template>
</template>
<script>
Polymer('x-repeat', {
ifItem: true,
items: [1,2,3,4,5]
});
</script>
</polymer-element>
<x-repeat></x-repeat>
</body>
</html>
94 changes: 94 additions & 0 deletions sorvell/flex/polymer-flex-cat-layout.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
/*
Copyright 2013 The Polymer Authors. All rights reserved.
Use of this source code is governed by a BSD-style
license that can be found in the LICENSE file.
*/
body ^^ .polymer-flex-row, body ^^ .polymer-flex-column {
display: -webkit-box !important;
display: -ms-flexbox !important;
display: -moz-flex !important;
display: -webkit-flex !important;
display: flex !important;
}

body ^^ .polymer-flex-row {
-webkit-box-orient: horizontal;
-ms-flex-direction: row;
-moz-flex-direction: row;
-webkit-flex-direction: row;
flex-direction: row;
}

body ^^ .polymer-flex-column {
-webkit-box-orient: vertical;
-ms-flex-direction: column;
-moz-flex-direction: column;
-webkit-flex-direction: column;
flex-direction: column;
}

body ^^ .polymer-flex-row > .flex, body ^^ .polymer-flex-column > .flex,
body ^^ .polymer-flex-row ^ .flex, body ^^ .polymer-flex-column ^ .flex {
-webkit-box-flex: 1;
-ms-flex: 1;
-moz-flex: 1;
-webkit-flex: 1;
flex: 1;
}


body ^^ .polymer-flex-row.align-start, body ^^ .polymer-flex-column.align-start {
-webkit-box-align: start;
-ms-flex-align: start;
-moz-align-items: flex-start;
-webkit-align-items: flex-start;
align-items: flex-start;
}

body ^^ .polymer-flex-row.align-end, body ^^ .polymer-flex-column.align-end {
-webkit-box-align: end;
-ms-flex-align: end;
-moz-align-items: flex-end;
-webkit-align-items: flex-end;
align-items: flex-end;
}

body ^^ .polymer-flex-row.align-center, body ^^ .polymer-flex-column.align-center {
-webkit-box-align: center;
-ms-flex-align: center;
-moz-align-items: center;
-webkit-align-items: center;
align-items: center;
}

body ^^ .polymer-flex-row.justify-start, body ^^ .polymer-flex-column.justify-start {
-webkit-box-pack: start;
-ms-flex-pack: start;
-moz-justify-content: flex-start;
-webkit-justify-content: flex-start;
justify-content: flex-start;
}

body ^^ .polymer-flex-row.justify-end, body ^^ .polymer-flex-column.justify-end {
-webkit-box-pack: end;
-ms-flex-pack: end;
-moz-justify-content: flex-end;
-webkit-justify-content: flex-end;
justify-content: flex-end;
}

body ^^ .polymer-flex-row.justify-center, body ^^ .polymer-flex-column.justify-center {
-webkit-box-pack: center;
-ms-flex-pack: center;
-moz-justify-content: center;
-webkit-justify-content: center;
justify-content: center;
}

body ^^ .polymer-flex-row.justify-between, body ^^ .polymer-flex-column.justify-between {
-webkit-box-pack: justify;
-ms-flex-pack: justify;
-moz-justify-content: space-between;
-webkit-justify-content: space-between;
justify-content: space-between;
}

0 comments on commit d391ba4

Please sign in to comment.