Last active
August 29, 2015 14:06
-
-
Save webOS101/337d1a76bf5d4e888433 to your computer and use it in GitHub Desktop.
Panels Sample
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.panels-sample > * { | |
width: 200px; | |
} | |
@media all and (max-width: 500px) { | |
.panels-sample > * { | |
min-width: 200px; | |
max-width: 100%; | |
width: 50%; | |
} | |
} | |
@media all and (max-width: 300px) { | |
.panels-sample > * { | |
min-width: 100%; | |
max-width: 100%; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
enyo.ready(function() { | |
enyo.kind({ | |
name: 'PanelsSample', | |
kind: 'Panels', | |
arrangerKind: 'CollapsingArranger', | |
classes: 'panels-sample', | |
narrowFit: false, | |
handlers: { | |
onTransitionFinish: 'transitioned' | |
}, | |
components: [ | |
{ name: 'panel1', style: 'background-color: blue' }, | |
{ name: 'panel2', style: 'background-color: grey' }, | |
{ name: 'panel3', style: 'background-color: green' } | |
], | |
transitioned: function() { | |
this.log(this.index); | |
} | |
}); | |
new enyo.Application({ name: 'app', view: 'PanelsSample' }); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Panels Sample | |
description: Demonstrates using CSS with Panels to allow for dynamic sizing | |
authors: | |
- Roy Sutton | |
normalize_css: no |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Try it out on jsFiddle
From: Enyo: Up and Running by Roy Sutton