]> BookStack Code Mirror - bookstack/blobdiff - resources/sass/_pages.scss
Added examples, updated docs for image gallery api endpoints
[bookstack] / resources / sass / _pages.scss
index 7019051653f8a17e62f400e2079143786797c876..57718e647167417cf89689fbcabde43af9b42c5d 100755 (executable)
@@ -3,7 +3,6 @@
   flex-direction: column;
   align-items: stretch;
   overflow: hidden;
-  background-color: #FFF;
 
   .edit-area {
     flex: 1;
   }
 }
 
-body.mce-fullscreen .page-editor .edit-area,
+body.tox-fullscreen .page-editor .edit-area,
 body.markdown-fullscreen .page-editor .edit-area {
   z-index: 12;
 }
 
-body.mce-fullscreen, body.markdown-fullscreen {
+body.tox-fullscreen, body.markdown-fullscreen {
   .page-editor, .flex-fill {
     overflow: visible;
   }
@@ -136,6 +135,44 @@ body.mce-fullscreen, body.markdown-fullscreen {
     background: #FFECEC;
   }
 
+  details {
+    border: 1px solid;
+    @include lightDark(border-color, #DDD, #555);
+    margin-bottom: 1em;
+    padding: $-s;
+  }
+  details > summary {
+    margin-top: -$-s;
+    margin-left: -$-s;
+    margin-right: -$-s;
+    margin-bottom: -$-s;
+    font-weight: bold;
+    @include lightDark(background-color, #EEE, #333);
+    padding: $-xs $-s;
+  }
+  details[open] > summary {
+    margin-bottom: $-s;
+    border-bottom: 1px solid;
+    @include lightDark(border-color, #DDD, #555);
+  }
+  details > summary + * {
+    margin-top: .2em;
+  }
+  details:after {
+    content: '';
+    display: block;
+    clear: both;
+  }
+
+  li > input[type="checkbox"] {
+    vertical-align: top;
+    margin-top: 0.3em;
+  }
+
+  p:empty {
+    min-height: 1.6em;
+  }
+
   &.page-revision {
     pre code {
       white-space: pre-wrap;
@@ -145,24 +182,22 @@ body.mce-fullscreen, body.markdown-fullscreen {
 
 // Page content pointers
 .pointer-container {
-  position: relative;
+  position: fixed;
   display: none;
   left: 0;
   z-index: 10;
 }
 .pointer {
   border: 1px solid #CCC;
+  @include lightDark(border-color, #ccc, #000);
   display: flex;
   align-items: center;
   justify-items: center;
   padding: $-s $-s;
   border-radius: 4px;
-  box-shadow: 0 0 12px 1px rgba(212, 209, 209, 0.3);
-  position: absolute;
-  top: -60px;
-  background-color:#FFF;
+  box-shadow: 0 0 12px 1px rgba(0, 0, 0, 0.1);
+  @include lightDark(background-color, #fff, #333);
   width: 275px;
-  z-index: 55;
 
   &.is-page-editable {
     width: 328px;
@@ -177,12 +212,13 @@ body.mce-fullscreen, body.markdown-fullscreen {
     margin-inline-start: -8px;
     content: '';
     display: block;
-    background-color:#FFF;
     transform: rotate(45deg);
     transform-origin: 50% 50%;
-    border-inline-startom: 1px solid #CCC;
+    border-block-end: 1px solid #CCC;
     border-inline-end: 1px solid #CCC;
     z-index: 56;
+    @include lightDark(background-color, #fff, #333);
+    @include lightDark(border-color, #ccc, #000);
   }
   input, button, a {
     position: relative;
@@ -195,6 +231,7 @@ body.mce-fullscreen, body.markdown-fullscreen {
   input {
     background-color: #FFF;
     border: 1px solid #DDD;
+    @include lightDark(border-color, #ddd, #000);
     color: #666;
     width: 172px;
     z-index: 40;
@@ -219,12 +256,16 @@ body.mce-fullscreen, body.markdown-fullscreen {
     width: 1.2em;
     height: 1.2em;
   }
+  .button {
+    @include lightDark(border-color, #ddd, #000);
+  }
 }
 
 // Attribute form
 .floating-toolbox {
-  background-color: #FFF;
   border: 1px solid #DDD;
+  @include lightDark(background-color, #fff, #222);
+  @include lightDark(border-color, #DDD, #000);
   right: $-xl*2;
   width: 48px;
   overflow: hidden;
@@ -237,16 +278,16 @@ body.mce-fullscreen, body.markdown-fullscreen {
   &.open {
     width: 480px;
   }
-  [toolbox-toggle] svg {
+  .toolbox-toggle svg {
     transition: transform ease-in-out 180ms;
   }
-  [toolbox-toggle] {
+  .toolbox-toggle {
     transition: background-color ease-in-out 180ms;
   }
-  &.open [toolbox-toggle] {
+  &.open .toolbox-toggle {
     background-color: rgba(255, 0, 0, 0.29);
   }
-  &.open [toolbox-toggle] svg {
+  &.open .toolbox-toggle svg {
     transform: rotate(180deg);
   }
   > div {
@@ -256,15 +297,16 @@ body.mce-fullscreen, body.markdown-fullscreen {
   .tabs {
     display: block;
     border-inline-end: 1px solid #DDD;
+    @include lightDark(border-color, #ddd, #000);
     width: 48px;
     flex: 0 1 auto;
   }
   .tabs svg {
-    fill: rgba(0, 0, 0, 0.5);
     padding: 0;
     margin: 0;
   }
   .tabs > button {
+    @include lightDark(color, rgba(0, 0, 0, 0.5), rgba(255, 255, 255, 0.5));
     display: block;
     cursor: pointer;
     padding: $-s $-m;
@@ -273,17 +315,9 @@ body.mce-fullscreen, body.markdown-fullscreen {
     border-bottom: 1px solid rgba(255, 255, 255, 0.3);
   }
   &.open .tabs > button.active {
-    fill: #444;
+    @include lightDark(color, #444, #EEE);
     background-color: rgba(0, 0, 0, 0.1);
   }
-  div[toolbox-tab-content] {
-    padding-bottom: 45px;
-    display: flex;
-    flex: 1;
-    flex-direction: column;
-    min-height: 0px;
-    overflow-y: scroll;
-  }
   h4 {
     font-size: 24px;
     margin: $-m 0 0 0;
@@ -315,30 +349,24 @@ body.mce-fullscreen, body.markdown-fullscreen {
   }
 }
 
-[toolbox-tab-content] {
+.toolbox-tab-content {
   display: none;
+  overflow-y: auto;
+  padding-bottom: 45px;
 }
 
 .suggestion-box {
-  position: absolute;
-  background-color: #FFF;
-  border: 1px solid #BBB;
-  box-shadow: $bs-light;
-  list-style: none;
-  z-index: 100;
+  top: auto;
+  margin: -4px 0 0;
+  right: auto;
+  left: 0;
   padding: 0;
-  margin: 0;
-  border-radius: 3px;
   li {
     display: block;
-    padding: $-xs $-s;
     border-bottom: 1px solid #DDD;
     &:last-child {
       border-bottom: 0;
     }
-    &.active {
-      background-color: #EEE;
-    }
   }
 }
 
@@ -359,10 +387,14 @@ body.mce-fullscreen, body.markdown-fullscreen {
   }
 }
 
-.entity-list-item > span:first-child, .icon-list-item > span:first-child, .chapter-expansion > .icon {
+.entity-list-item > span:first-child,
+.icon-list-item > span:first-child,
+.split-icon-list-item > a > .icon,
+.chapter-expansion > .icon {
   font-size: 0.8rem;
   width: 1.88em;
   height: 1.88em;
+  flex-shrink: 0;
   display: flex;
   align-items: center;
   justify-content: center;
@@ -413,4 +445,7 @@ body.mce-fullscreen, body.markdown-fullscreen {
     text-decoration: none;
     opacity: 1;
   }
+  @media (prefers-contrast: more) {
+    opacity: 1;
+  }
 }
\ No newline at end of file