Skip to content

Instantly share code, notes, and snippets.

@webOS101
Created December 12, 2012 01:51
Show Gist options
  • Save webOS101/4264169 to your computer and use it in GitHub Desktop.
Save webOS101/4264169 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: 50%;
width: 50%;
}
}
@media all and (max-width: 300px) {
.panels-sample > * {
min-width: 100%;
max-width: 100%;
}
}
<script>
new PanelsSample().renderInto(document.body);
</script>
enyo.kind({
name: "PanelsSample",
kind: "FittableRows",
components: [
{ kind: "Panels", fit: true, arrangerKind: "CollapsingArranger",
classes: "panels-sample", narrowFit: false,
components: [
{ name: "panel1", style: "background-color: blue" },
{ name: "panel2", style: "background-color: grey" },
{ name: "panel3", style: "background-color: green" }
]
}
]
});
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