]> BookStack Code Mirror - bookstack/blobdiff - resources/sass/_mixins.scss
Perms: Fixed some issues made when adding transactions
[bookstack] / resources / sass / _mixins.scss
index 8a6becf6b70746131a0e54b05545b4bc288721f9..fc50860083936d77902488b022b108dd6edf7a2c 100644 (file)
@@ -3,10 +3,10 @@
     @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) {
-  @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.
   html[dir=rtl] & {
     @content;
   }
+}
+
+// Define a property for both light and dark mode
+@mixin lightDark($prop, $light, $dark, $important: false) {
+  #{$prop}: if($important, $light !important, $light);
+  html.dark-mode & {
+    #{$prop}: if($important, $dark !important, $dark);
+  }
+}
+
+@mixin whenDark {
+    html.dark-mode & {
+      @content;
+    }
 }
\ No newline at end of file