Skip to content

Commit cde93f3

Browse files
authored
fix: restore mobile sidebar width broken by Sass 1.101 cascade change (#21)
Sass >=1.101 emits declarations that follow a nested @media *after* the bubbled media block, so .app-view__sidebar's base `min-width: 200px` started overriding the `@media (max-width: 600px) { min-width: 250px }`. The mobile sidebar shrank to 200px while the body still slid translateX(-250px) to cover it, shifting the whole app 50px left on iOS/narrow viewports (clipped category labels, broken category scroll). Desktop has no media query and was unaffected. Move the @media block after the base declarations so it wins the cascade again.
1 parent c37ffda commit cde93f3

1 file changed

Lines changed: 13 additions & 13 deletions

File tree

src/styles/appView.scss

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,6 @@
1717
}
1818

1919
.app-view__sidebar {
20-
@media (max-width: 600px) {
21-
min-width: 250px; // ignore configured sidebar width
22-
max-width: 250px; // ignore configured sidebar width
23-
24-
transform: translateX(-250px);
25-
26-
transition: transform 250ms ease;
27-
28-
.app-view--sidebar-open & {
29-
transform: translateX(0);
30-
}
31-
}
32-
3320
width: 15em;
3421
position: relative;
3522

@@ -45,6 +32,19 @@
4532
a {
4633
text-decoration: none;
4734
}
35+
36+
@media (max-width: 600px) {
37+
min-width: 250px; // ignore configured sidebar width
38+
max-width: 250px; // ignore configured sidebar width
39+
40+
transform: translateX(-250px);
41+
42+
transition: transform 250ms ease;
43+
44+
.app-view--sidebar-open & {
45+
transform: translateX(0);
46+
}
47+
}
4848
}
4949

5050
.app-view__budget-options {

0 commit comments

Comments
 (0)