]> BookStack Code Mirror - bookstack/commitdiff
Styles: Fixed breakpoint overlap
authorDan Brown <redacted>
Sun, 23 Feb 2025 11:19:11 +0000 (11:19 +0000)
committerDan Brown <redacted>
Sun, 23 Feb 2025 11:19:11 +0000 (11:19 +0000)
Alters common breakpoint utilities to not overlap at breakpoints which
would cause broken layout at those points.
For #5396

resources/js/components/tri-layout.js
resources/sass/_mixins.scss

index 8ccefb06c482b09da5c7c0d4103f3d8307b8ee12..be9388e8d4615f5919a81068ff57915bc9d52ae9 100644 (file)
@@ -27,7 +27,7 @@ export class TriLayout extends Component {
     updateLayout() {
         let newLayout = 'tablet';
         if (window.innerWidth <= 1000) newLayout = 'mobile';
     updateLayout() {
         let newLayout = 'tablet';
         if (window.innerWidth <= 1000) newLayout = 'mobile';
-        if (window.innerWidth >= 1400) newLayout = 'desktop';
+        if (window.innerWidth > 1400) newLayout = 'desktop';
         if (newLayout === this.lastLayoutType) return;
 
         if (this.onDestroy) {
         if (newLayout === this.lastLayoutType) return;
 
         if (this.onDestroy) {
index 0a419c08abdeb1372e331277fcd157394d100918..fc50860083936d77902488b022b108dd6edf7a2c 100644 (file)
@@ -3,10 +3,10 @@
     @media screen and (max-width: $size) { @content; }
 }
 @mixin larger-than($size) {
     @media screen and (max-width: $size) { @content; }
 }
 @mixin larger-than($size) {
-    @media screen and (min-width: $size) { @content; }
+    @media screen and (min-width: ($size + 1)) { @content; }
 }
 @mixin between($min, $max) {
 }
 @mixin between($min, $max) {
-  @media screen and (min-width: $min) and (max-width: $max) { @content; }
+  @media screen and (min-width: ($min + 1)) and (max-width: $max) { @content; }
 }
 
 // Padding shorthand using logical operators to better support RTL.
 }
 
 // Padding shorthand using logical operators to better support RTL.