Skip to content

Instantly share code, notes, and snippets.

@webOS101
Last active August 29, 2015 14:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save webOS101/337d1a76bf5d4e888433 to your computer and use it in GitHub Desktop.
Save webOS101/337d1a76bf5d4e888433 to your computer and use it in GitHub Desktop.
Panels Sample
.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%;
}
}
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' });
});
name: Panels Sample
description: Demonstrates using CSS with Panels to allow for dynamic sizing
authors:
- Roy Sutton
normalize_css: no
@webOS101
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment