|
36 | 36 | & #leftPanels {
|
37 | 37 | order: 1;
|
38 | 38 | width: ~"var(--panel-column-left-width)";
|
39 |
| - padding-right: ~"calc(var(--grid-gutter-width) / 2)"; |
40 | 39 | }
|
41 | 40 |
|
42 |
| - & #rightPanels, & #editPanels { |
| 41 | + & #rightPanels { |
43 | 42 | order: 3;
|
44 | 43 | width: ~"var(--panel-column-right-width)";
|
45 |
| - padding-left: ~"calc(var(--grid-gutter-width) / 2)"; |
46 | 44 | }
|
47 | 45 |
|
48 | 46 | /* Depending on the admin parameters, we want to change the default size. */
|
|
62 | 60 | /* The functionality to hide the panel takes precedence over the panel size defaults.
|
63 | 61 | This ruleset should come after the rules for .panel-left-width-<WIDTH> */
|
64 | 62 | &.hideleft {
|
65 |
| - -/**/-panel-column-left-width: 0; |
66 |
| - |
67 |
| - & #leftPanels { |
68 |
| - display: none; |
| 63 | + /* When the screen is small enough, we keep panels shown. |
| 64 | + Note that templates to generate panel columns only generate them if the panels are not hidden by admin choice. |
| 65 | + ie. this media query does not short-circuit the admin preference. */ |
| 66 | + @media (min-width: @screen-md-min) { |
| 67 | + -/**/-panel-column-left-width: 0; |
| 68 | + |
| 69 | + & #leftPanels { |
| 70 | + display: none; |
| 71 | + } |
69 | 72 | }
|
70 | 73 | }
|
71 | 74 |
|
|
80 | 83 | /* The functionality to hide the panel takes precedence over the panel size defaults.
|
81 | 84 | This ruleset should come after the rules for .panel-right-width-<WIDTH> */
|
82 | 85 | &.hideright {
|
83 |
| - -/**/-panel-column-right-width: 0; |
84 |
| - |
85 |
| - & #rightPanels { |
86 |
| - display: none; |
| 86 | + /* When the screen is small enough, we keep panels shown. |
| 87 | + Note that templates to generate panel columns only generate them if the panels are not hidden by admin choice. |
| 88 | + ie. this media query does not short-circuit the admin preference. */ |
| 89 | + @media (min-width: @screen-md-min) { |
| 90 | + -/**/-panel-column-right-width: 0; |
| 91 | + |
| 92 | + & #rightPanels { |
| 93 | + display: none; |
| 94 | + } |
87 | 95 | }
|
88 | 96 | }
|
89 | 97 |
|
90 | 98 | &.hidelefthideright {
|
91 |
| - -/**/-panel-column-left-width: 0; |
92 |
| - -/**/-panel-column-right-width: 0; |
93 |
| - |
94 |
| - & #leftPanels, & #rightPanels { |
95 |
| - display: none; |
| 99 | + /* When the screen is small enough, we keep panels shown. |
| 100 | + Note that templates to generate panel columns only generate them if the panels are not hidden by admin choice. |
| 101 | + ie. this media query does not short-circuit the admin preference. */ |
| 102 | + @media (min-width: @screen-md-min) { |
| 103 | + -/**/-panel-column-left-width: 0; |
| 104 | + -/**/-panel-column-right-width: 0; |
| 105 | + |
| 106 | + & #leftPanels, & #rightPanels { |
| 107 | + display: none; |
| 108 | + } |
96 | 109 | }
|
97 | 110 | }
|
98 | 111 |
|
|
162 | 175 | resize: vertical;
|
163 | 176 | }
|
164 | 177 |
|
165 |
| -.main, #editcolumn, |
166 |
| -#leftPanels, #rightPanels, #editPanels { |
| 178 | +.main, #editcolumn, #leftPanels, #rightPanels { |
167 | 179 | position: relative;
|
168 | 180 | padding-top: (@grid-gutter-width / 2);
|
169 | 181 | padding-bottom: (@grid-gutter-width / 2);
|
@@ -213,6 +225,15 @@ again or the page is reloaded (because the toggler is hidden until then). */
|
213 | 225 | #rightPanelsToggle:hover, #rightPanelsToggle:focus {
|
214 | 226 | opacity: 1;
|
215 | 227 | }
|
| 228 | + |
| 229 | + /* When the display is large enough, we add padding on the outer sides of the panel columns. */ |
| 230 | + #leftPanels { |
| 231 | + padding-right: ~"calc(var(--grid-gutter-width) / 2)"; |
| 232 | + } |
| 233 | + |
| 234 | + #rightPanels { |
| 235 | + padding-left: ~"calc(var(--grid-gutter-width) / 2)"; |
| 236 | + } |
216 | 237 | }
|
217 | 238 |
|
218 | 239 | body#body #rightPanelsToggle {
|
|
0 commit comments