...
-
+
...
@@ -52,7 +41,24 @@ html={`
...
`}
-css={``}
+css={`
+.container {
+ display: flex;
+}
+.column {
+ flex: 1;
+ /* Space between columns */
+ margin: 0 8px;
+
+ /* Layout each column */
+ display: flex;
+ flex-direction: column;
+}
+.content {
+ /* Take available height */
+ flex: 1;
+}
+`}
>
= () => {
Try to scroll the main content!
+
`}
-css={``}
+css={`
+.container {
+ display: flex;
+}
+.sidebar {
+ width: 30%;
+}
+.main {
+ /* Take the remaining width */
+ flex: 1;
+
+ /* Make it scrollable */
+ overflow: auto;
+}
+`}
>
= () => {
-
+
-
25%
+
25%
-
`}
-css={``}
+css={`
+.row {
+ display: flex;
+
+ margin-left: -8px;
+ margin-right: -8px;
+}
+.cell {
+ padding-left: 8px;
+ padding-right: 8px;
+}
+
+/* Cell with given width. Replace 25% with whatever you want */
+.cell.width-1/4 {
+ flex: 0 0 25%;
+}
+.cell.width-fill {
+ flex: 1;
+}
+`}
>
= () => {
+
-
+
...
-
`}
-css={``}
+css={`
+.container {
+ display: flex;
+}
+.half {
+ flex: 1;
+}
+`}
>