]> BookStack Code Mirror - bookstack/blobdiff - resources/sass/_layout.scss
Added additional testing for editor switching permissions
[bookstack] / resources / sass / _layout.scss
index 197d5271b7d1017cf8c2293c494a46dbc392ac40..b1c80cb53eb7e95b3e3d3ceb023392ffad54a644 100644 (file)
@@ -8,6 +8,9 @@
   margin-inline-end: auto;
   padding-inline-start: $-m;
   padding-inline-end: $-m;
+  &.medium {
+    max-width: 1100px;
+  }
   &.small {
     max-width: 840px;
   }
@@ -49,6 +52,9 @@
   &.v-center {
     align-items: center;
   }
+  &.v-end {
+    align-items: end;
+  }
   &.no-gap {
     grid-row-gap: 0;
     grid-column-gap: 0;
   }
 }
 
+#content {
+  flex: 1 0 auto;
+}
+
 /**
  * Flexbox layout system
  */
@@ -118,9 +128,44 @@ body.flexbox {
   position: relative;
 }
 
+.flex-container-row {
+  display: flex;
+  flex-direction: row;
+  &.v-center {
+    align-items: center;
+  }
+}
+
+.flex-container-column {
+  display: flex;
+  flex-direction: column;
+}
+
+.flex-container-column.wrap, .flex-container-row.wrap {
+  flex-wrap: wrap;
+}
+
 .flex {
   min-height: 0;
   flex: 1;
+  max-width: 100%;
+  &.fit-content {
+    flex-basis: auto;
+    flex-grow: 0;
+  }
+}
+
+.justify-flex-end {
+  justify-content: flex-end;
+}
+.justify-center {
+  justify-content: center;
+}
+.justify-space-between {
+  justify-content: space-between;
+}
+.items-center {
+  align-items: center;
 }
 
 
@@ -128,20 +173,28 @@ body.flexbox {
  * Display and float utilities
  */
 .block {
-  display: block;
+  display: block !important;
   position: relative;
 }
 
 .inline {
-  display: inline;
+  display: inline !important;
 }
 
 .block.inline {
-  display: inline-block;
+  display: inline-block !important;
+}
+
+.relative {
+  position: relative;
 }
 
 .hidden {
-  display: none;
+  display: none !important;
+}
+
+.fill-height {
+  height: 100%;
 }
 
 .float {
@@ -167,6 +220,13 @@ body.flexbox {
   }
 }
 
+/**
+ * Border radiuses
+ */
+.rounded {
+  border-radius: 4px;
+}
+
 /**
  * Inline content columns
  */
@@ -184,12 +244,12 @@ body.flexbox {
 /**
  * Fixes
  */
-.clearfix:before,
-.clearfix:after {
+.clearfix::before,
+.clearfix::after {
   content: " ";
   display: table;
 }
-.clearfix:after {
+.clearfix::after {
   clear: both;
 }
 
@@ -214,6 +274,7 @@ body.flexbox {
   .tri-layout-middle {
     grid-area: b;
     padding-top: $-m;
+    min-width: 0;
   }
 }
 @include smaller-than($xxl) {
@@ -241,6 +302,7 @@ body.flexbox {
     min-height: 50vh;
     overflow-y: scroll;
     overflow-x: hidden;
+    height: 100%;
     scrollbar-width: none;
     -ms-overflow-style: none;
     &::-webkit-scrollbar {
@@ -302,13 +364,13 @@ body.flexbox {
     display: none;
   }
   .tri-layout-left-contents > *, .tri-layout-right-contents > * {
-    opacity: 0.6;
+    @include lightDark(opacity, 0.6, 0.7);
     transition: opacity ease-in-out 120ms;
-    &:hover {
-      opacity: 1;
+    &:hover, &:focus-within {
+      opacity: 1 !important;
     }
-    &:focus-within {
-      opacity: 1;
+    @media (prefers-contrast: more) {
+      opacity: 1 !important;
     }
   }