|
1 |
| -/* |
2 |
| - OQ: convention: _ for variables? |
3 |
| - TODO: refactor into resuable vars file |
4 |
| - https://github.com/css-modules/css-modules/blob/master/docs/values-variables.md |
5 |
| -*/ |
6 |
| -@value _space: 0.5rem; |
| 1 | +@import "../../css/units.css"; |
7 | 2 |
|
8 | 3 | .page-wrapper {
|
9 | 4 | height: 100%;
|
10 | 5 | }
|
11 | 6 |
|
12 | 7 | .body-wrapper {
|
13 |
| - /* |
| 8 | + /* |
14 | 9 | Calc the height by subtracting the menu bar height
|
15 | 10 | TODO: Make height a reusable variable, link to use in .menu-bar
|
16 | 11 | */
|
17 |
| - height: calc(100% - 3rem); |
| 12 | + height: calc(100% - 3rem); |
18 | 13 | background-color: #e8edf1;
|
19 | 14 | }
|
20 | 15 |
|
21 | 16 | .flex-wrapper {
|
22 | 17 | display: flex;
|
23 | 18 |
|
24 |
| - /* |
25 |
| - Make 2 columns: |
26 |
| - a) for the blocks + workspace panes, and |
27 |
| - b) for combined stage menu + stage + sprite/stage selectors |
| 19 | + /* |
| 20 | + Make 2 columns: |
| 21 | + a) for the blocks + workspace panes, and |
| 22 | + b) for combined stage menu + stage + sprite/stage selectors |
28 | 23 | */
|
29 |
| - flex-direction: row; |
| 24 | + flex-direction: row; |
30 | 25 | height: 100%;
|
31 | 26 | }
|
32 | 27 |
|
33 | 28 | .blocks-wrapper {
|
34 |
| - /* |
35 |
| - scratch-blocks is based on absolute positioning, which injects |
| 29 | + /* |
| 30 | + scratch-blocks is based on absolute positioning, which injects |
36 | 31 | inside this element and becomes the child
|
37 | 32 | */
|
38 |
| - position: relative; |
| 33 | + position: relative; |
39 | 34 |
|
40 | 35 | flex-basis: 600px;
|
41 | 36 | flex-grow: 1;
|
42 | 37 | flex-shrink: 0;
|
43 | 38 |
|
44 |
| - /* |
45 |
| - Normally we'd use padding, but the absolute positioning ignores it, |
46 |
| - so use margin instead. Temporary, until tabs are inserted. |
| 39 | + /* |
| 40 | + Normally we'd use padding, but the absolute positioning ignores it, |
| 41 | + so use margin instead. Temporary, until tabs are inserted. |
47 | 42 | */
|
48 |
| - margin-top: 3rem; |
| 43 | + margin-top: 3rem; |
49 | 44 |
|
50 | 45 | background: #e8edf1;
|
51 | 46 | }
|
52 | 47 |
|
53 | 48 | .stage-and-target-wrapper {
|
54 |
| - /* |
55 |
| - Make rows for children: |
| 49 | + /* |
| 50 | + Make rows for children: |
56 | 51 | 1) stage menu
|
57 | 52 | 2) stage
|
58 | 53 | 3) sprite/stage selectors
|
59 |
| - Only reason we need this, is so .targetWrapper, which holds the selectors, |
| 54 | + Only reason we need this, is so .targetWrapper, which holds the selectors, |
60 | 55 | goes to full vertical height of the window
|
61 | 56 | */
|
62 | 57 | display: flex;
|
63 |
| - flex-direction: column; |
| 58 | + flex-direction: column; |
64 | 59 |
|
65 |
| - /* |
66 |
| - Calc the minimum width for this pane, accounting for left + right spacing. |
67 |
| - If and when the width doesn't need to be fixed, we can move the spacing out |
68 |
| - of this calc, and into padding instead |
| 60 | + /* |
| 61 | + Calc the minimum width for this pane, accounting for left + right spacing. |
| 62 | + If and when the width doesn't need to be fixed, we can move the spacing out |
| 63 | + of this calc, and into padding instead |
69 | 64 | */
|
70 |
| - flex-basis: calc(480px + (_space * 2)); |
71 |
| -} |
| 65 | + flex-basis: calc(480px + ($space * 2)); |
| 66 | +} |
72 | 67 |
|
73 | 68 | .stage-wrapper {
|
74 |
| - padding-left: _space; |
75 |
| - padding-right: _space; |
| 69 | + padding-left: $space; |
| 70 | + padding-right: $space; |
76 | 71 | }
|
77 | 72 |
|
78 | 73 | .target-wrapper {
|
79 | 74 | /* Take all the available vertical space available.
|
80 |
| - Works in tandem with height: 100%; which is set on the child: .targetPane |
81 |
| - TODO: Not working in Safari, not great in FFx |
| 75 | + Works in tandem with height: 100%; which is set on the child: .targetPane |
| 76 | + TODO: Not working in Safari, not great in FFx |
82 | 77 | */
|
83 | 78 | flex-grow: 1;
|
84 | 79 | flex-basis: 0;
|
85 | 80 |
|
86 |
| - padding-top: _space; |
87 |
| - padding-left: _space; |
88 |
| - padding-right: _space; |
89 |
| - |
90 |
| - /* |
| 81 | + padding-top: $space; |
| 82 | + padding-left: $space; |
| 83 | + padding-right: $space; |
| 84 | + |
| 85 | + /* |
91 | 86 | For making the sprite-selector a scrollable pane.
|
92 |
| - TODO: Not working in Safari |
| 87 | + TODO: Not working in Safari |
93 | 88 | */
|
94 | 89 | overflow: hidden;
|
95 | 90 | }
|
|
99 | 94 | flex-shrink: 0;
|
100 | 95 | align-items: center;
|
101 | 96 | height: 3rem;
|
102 |
| - padding: _space; |
| 97 | + padding: $space; |
103 | 98 | }
|
0 commit comments