]> BookStack Code Mirror - bookstack/blob - resources/sass/_components.scss
Image manager: Redesigned header bar(s)
[bookstack] / resources / sass / _components.scss
1
2 // System wide notifications
3 .notification {
4   position: fixed;
5   top: 0;
6   right: 0;
7   margin: $-xl;
8   padding: $-m $-l;
9   background-color: #FFF;
10   @include lightDark(background-color, #fff, #444);
11   border-radius: 4px;
12   border-inline-start: 6px solid currentColor;
13   box-shadow: $bs-large;
14   z-index: 999999;
15   cursor: pointer;
16   max-width: 360px;
17   transition: transform ease-in-out 280ms;
18   transform: translateX(580px);
19   display: grid;
20   grid-template-columns: 42px 1fr 12px;
21   color: #444;
22   font-weight: 700;
23   span, svg {
24     vertical-align: middle;
25     justify-self: center;
26     align-self: center;
27   }
28   svg {
29     width: 2.8rem;
30     height: 2.8rem;
31     padding-inline-end: $-s;
32     fill: currentColor;
33   }
34   .dismiss {
35     margin-top: -8px;
36     svg {
37       height: 1.0rem;
38       @include lightDark(color, #444, #888);
39     }
40   }
41   span {
42     vertical-align: middle;
43     line-height: 1.3;
44     @include whenDark {
45       color: #BBB;
46     }
47   }
48   &.pos {
49     color: $positive;
50   }
51   &.neg {
52     color: $negative;
53   }
54   &.warning {
55     color: $warning;
56   }
57   &.showing {
58     transform: translateX(0);
59   }
60   &.showing:hover {
61     transform: translate3d(0, -2px, 0);
62   }
63 }
64
65 .chapter-contents-toggle {
66   cursor: pointer;
67   margin: 0;
68   transition: all ease-in-out 180ms;
69   user-select: none;
70   svg[data-icon="caret-right"] {
71     margin-inline-end: 0;
72     font-size: 1rem;
73     transition: all ease-in-out 180ms;
74     transform: rotate(0deg);
75     transform-origin: 50% 50%;
76   }
77   &.open svg[data-icon="caret-right"] {
78     transform: rotate(90deg);
79   }
80   svg[data-icon="caret-right"] + * {
81     margin-inline-start: $-xxs;
82   }
83 }
84
85 [overlay], .popup-background {
86   @include lightDark(background-color, rgba(0, 0, 0, 0.333), rgba(0, 0, 0, 0.6));
87   position: fixed;
88   z-index: 95536;
89   width: 100%;
90   height: 100%;
91   min-width: 100%;
92   min-height: 100%;
93   top: 0;
94   left: 0;
95   right: 0;
96   bottom: 0;
97   align-items: center;
98   justify-content: center;
99   display: none;
100 }
101
102 .popup-body-wrap {
103   display: flex;
104 }
105
106 .popup-body {
107   @include lightDark(background-color, #fff, #333);
108   max-height: 90%;
109   max-width: 1200px;
110   width: 90%;
111   height: auto;
112   margin: 2% auto;
113   border-radius: 4px;
114   box-shadow: 0 0 15px 0 rgba(0, 0, 0, 0.3);
115   overflow: hidden;
116   z-index: 999;
117   display: flex;
118   flex-direction: column;
119   position: relative;
120   &.small {
121     margin: 2% auto;
122     width: 800px;
123     max-width: 90%;
124   }
125   &.very-small {
126     margin: 2% auto;
127     width: 600px;
128     max-width: 90%;
129   }
130   &:before {
131     display: flex;
132     align-self: flex-start;
133   }
134   .popup-content {
135     overflow-y: auto;
136   }
137   &:focus {
138     outline: 0;
139   }
140 }
141
142 .popup-header button, .popup-footer button {
143   margin: 0;
144   border-radius: 0;
145   box-shadow: none;
146   color: #FFF;
147   padding: $-xs $-m;
148   cursor: pointer;
149 }
150
151 .popup-header button:not(.popup-header-close) {
152   font-size: 0.8rem;
153 }
154
155 .popup-header button:hover {
156     background-color: rgba(255, 255, 255, 0.1);
157 }
158
159 .popup-footer {
160   justify-content: end;
161   background-color: var(--color-primary-light);
162   min-height: 41px;
163   button {
164     padding: 10px $-m;
165   }
166 }
167
168 .popup-header-close {
169   border: 0;
170   color: #FFF;
171   font-size: 16px;
172   cursor: pointer;
173   svg {
174     margin-right: 0;
175   }
176 }
177
178 .popup-header, .popup-footer {
179   display: flex;
180   position: relative;
181   height: 40px;
182   flex: 0;
183   .popup-title {
184     color: #FFF;
185     margin-right: auto;
186     padding: 8px $-m;
187   }
188   &.flex-container-row {
189     display: flex !important;
190   }
191 }
192 body.flexbox-support #entity-selector-wrap .popup-body .form-group {
193   height: 444px;
194   min-height: 444px;
195 }
196 #entity-selector-wrap .popup-body .form-group {
197   margin: 0;
198 }
199 .popup-body .entity-selector-container {
200   flex: 1;
201 }
202
203 .dropzone-overlay {
204   position: absolute;
205   display: flex;
206   justify-content: center;
207   align-items: center;
208   font-size: 1.333rem;
209   width: 98%;
210   height: 98%;
211   left: 1%;
212   top: 1%;
213   border-radius: 4px;
214   border: 1px dashed var(--color-primary);
215   font-style: italic;
216   box-sizing: content-box;
217   background-clip: padding-box;
218   background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' viewBox='0 0 4 4'%3E%3Cpath fill='%23a9a9a9' fill-opacity='0.52' d='M1 3h1v1H1V3zm2-2h1v1H3V1z'%3E%3C/path%3E%3C/svg%3E");
219   background-color: var(--color-primary);
220   color: #FFF;
221   opacity: .8;
222   z-index: 9;
223   pointer-events: none;
224   animation: dzAnimIn 240ms ease-in-out;
225 }
226
227 .dropzone-landing-area {
228   background-color: var(--color-primary-light);
229   padding: $-m $-l;
230   width: 100%;
231   border: 1px dashed var(--color-primary);
232   color: var(--color-primary);
233   border-radius: 4px;
234 }
235
236 @keyframes dzAnimIn {
237   0% {
238     opacity: 0;
239     transform: scale(.7);
240   }
241   60% {
242     transform: scale(1.1);
243   }
244   100% {
245     transform: scale(1);
246     opacity: .8;
247   }
248 }
249
250 @keyframes dzFileItemIn {
251   0% {
252     opacity: .5;
253     transform: translateY(28px);
254   }
255   100% {
256     opacity: 1;
257     transform: translateY(0);
258   }
259 }
260 @keyframes dzFileItemOut {
261   0% {
262     opacity: 1;
263     transform: translateY(0);
264   }
265   100% {
266     opacity: .5;
267     transform: translateY(28px);
268   }
269 }
270
271 .dropzone-file-item {
272   width: 260px;
273   height: 80px;
274   position: relative;
275   display: flex;
276   margin: 1rem;
277   flex-direction: row;
278   @include lightDark(background, #FFF, #444);
279   box-shadow: $bs-large;
280   border-radius: 4px;
281   overflow: hidden;
282   padding-bottom: 3px;
283   animation: dzFileItemIn ease-in-out 240ms;
284   transition: transform ease-in-out 120ms, box-shadow ease-in-out 120ms;
285   cursor: pointer;
286   &:hover {
287     transform: translateY(-3px);
288     box-shadow: 0 3px 8px 1px rgba(22, 22, 22, 0.2);
289   }
290 }
291 .dropzone-file-item.dismiss {
292   animation: dzFileItemOut ease-in-out 240ms;
293 }
294 .dropzone-file-item .loading-container {
295   text-align: start !important;
296   margin: 0;
297 }
298 .dropzone-file-item-image-wrap {
299   width: 80px;
300   position: relative;
301   background-color: var(--color-primary-light);
302   img {
303     object-fit: cover;
304     width: 100%;
305     height: 100%;
306     opacity: .8;
307   }
308 }
309 .dropzone-file-item-text-wrap {
310   flex: 1;
311   display: block;
312   padding: 1rem;
313   overflow: auto;
314 }
315 .dropzone-file-item-progress {
316   position: absolute;
317   bottom: 0;
318   left: 0;
319   font-size: 0;
320   height: 3px;
321   background-color: var(--color-primary);
322   transition: width ease-in-out 240ms;
323 }
324 .dropzone-file-item-label,
325 .dropzone-file-item-status {
326   align-items: center;
327   font-size: .8rem;
328   font-weight: 700;
329 }
330 .dropzone-file-item-status[data-status] {
331   display: flex;
332   font-size: .6rem;
333   font-weight: 500;
334   line-height: 1.2;
335 }
336 .dropzone-file-item-status[data-status="success"] {
337   color: $positive;
338 }
339 .dropzone-file-item-status[data-status="error"] {
340   color: $negative;
341 }
342 .dropzone-file-item-status[data-status] + .dropzone-file-item-label {
343   display: none;
344 }
345
346 .image-manager-body {
347   min-height: 70vh;
348 }
349 .image-manager-filter-bar {
350   position: sticky;
351   top: 0;
352   z-index: 5;
353   background-color: rgba(255, 255, 255, 0.85);
354 }
355 .image-manager-filter-bar-bg {
356   position: absolute;
357   left: 0;
358   top: 0;
359   width: 100%;
360   height: 100%;
361   opacity: .15;
362   z-index: -1;
363 }
364 .image-manager-filter-bar .contained-search-box {
365   box-shadow: $bs-med;
366   border-radius: 4px;
367   margin: $-s $-m;
368   overflow: hidden;
369   input, button {
370     border: 0;
371   }
372   input:focus, input:active {
373     border: 0;
374     outline: 1px dotted var(--color-primary);
375   }
376   button {
377     width: 48px;
378     color: #444;
379     border-left: 1px solid #DDD;
380     background-color: #FFF;
381   }
382 }
383 .image-manager-filters {
384   box-shadow: $bs-med;
385   border-radius: 4px;
386   margin: $-s $-m;
387   overflow: hidden;
388   border-bottom: 0 !important;
389   button {
390     line-height: 0;
391     background-color: #FFF;
392   }
393   svg {
394     margin: 0;
395   }
396 }
397
398 .image-manager-list {
399   padding: 3px;
400   display: grid;
401   grid-template-columns: repeat( auto-fit, minmax(140px, 1fr) );
402   gap: 3px;
403   z-index: 3;
404   > div {
405     aspect-ratio: 1;
406   }
407 }
408
409 .image-manager-list .image {
410   display: block;
411   position: relative;
412   border-radius: 0;
413   margin: 0;
414   width: 100%;
415   text-align: start;
416   padding: 0;
417   cursor: pointer;
418   aspect-ratio: 1;
419   @include lightDark(border-color, #ddd, #000);
420   transition: all linear 80ms;
421   overflow: hidden;
422   &.selected {
423     background-color: var(--color-primary-light);
424     outline: currentColor 3px solid;
425     border-radius: 3px;
426     transform: scale3d(0.95, 0.95, 0.95);
427   }
428   img {
429     width: 100%;
430     max-width: 100%;
431     display: block;
432     object-fit: cover;
433     height: auto;
434   }
435   .image-meta {
436     opacity: 0;
437     position: absolute;
438     width: 100%;
439     bottom: 0;
440     left: 0;
441     color: #EEE;
442     background-color: rgba(0, 0, 0, 0.7);
443     font-size: 10px;
444     padding: 3px 4px;
445     pointer-events: none;
446     transition: opacity ease-in-out 80ms;
447     span {
448       display: block;
449     }
450   }
451   &.selected .image-meta,
452   &:hover .image-meta,
453   &:focus .image-meta {
454     opacity: 1;
455   }
456   @include smaller-than($m) {
457     .image-meta {
458       display: none;
459     }
460   }
461 }
462
463 .image-manager .load-more {
464   text-align: center;
465   padding: $-s $-m;
466   clear: both;
467   .loading-container {
468     margin: 0;
469   }
470 }
471
472 .image-manager .loading-container {
473   text-align: center;
474 }
475
476 .image-manager-sidebar {
477   width: 300px;
478   overflow-y: auto;
479   overflow-x: hidden;
480   border-inline-start: 1px solid #DDD;
481   @include lightDark(border-color, #ddd, #000);
482   .inner {
483     min-height: auto;
484     padding: $-m;
485   }
486   .image-manager-viewer img {
487     max-width: 100%;
488     max-height: 180px;
489     display: block;
490     margin: 0 auto $-m auto;
491     box-shadow: 0 1px 21px 1px rgba(76, 76, 76, 0.3);
492   }
493   .image-manager-viewer {
494     height: 196px;
495     display: flex;
496     align-items: center;
497     justify-content: center;
498     a {
499       display: inline-block;
500     }
501   }
502 }
503
504 .image-manager-content {
505   display: flex;
506   flex-direction: column;
507   flex: 1;
508   overflow-y: scroll;
509   .container {
510     width: 100%;
511   }
512   .full-tab {
513     text-align: center;
514   }
515 }
516
517 .tab-container.bordered [role="tablist"] button[role="tab"] {
518   border-right: 1px solid #DDD;
519   @include lightDark(border-right-color, #DDD, #000);
520   &:last-child {
521     border-right: none;
522   }
523 }
524
525 .tab-container [role="tablist"] {
526   display: flex;
527   align-items: end;
528   justify-items: start;
529   text-align: start;
530   border-bottom: 1px solid #DDD;
531   @include lightDark(border-color, #ddd, #444);
532   margin-bottom: $-m;
533 }
534
535 .tab-container [role="tablist"] button[role="tab"] {
536   display: inline-block;
537   padding: $-s;
538   @include lightDark(color, rgba(0, 0, 0, .5), rgba(255, 255, 255, .5));
539   cursor: pointer;
540   border-bottom: 2px solid transparent;
541   margin-bottom: -1px;
542   &[aria-selected="true"] {
543     color: var(--color-link) !important;
544     border-bottom-color: var(--color-link) !important;
545   }
546   &:hover, &:focus {
547     @include lightDark(color, rgba(0, 0, 0, .8), rgba(255, 255, 255, .8));
548     @include lightDark(border-bottom-color,  rgba(0, 0, 0, .2), rgba(255, 255, 255, .2));
549   }
550 }
551 .tab-container.tab-primary [role="tablist"] button[role="tab"][aria-selected="true"] {
552   color: var(--color-primary) !important;
553   border-bottom-color: var(--color-primary) !important;
554 }
555 .tab-container [role="tablist"].controls-card {
556   margin-bottom: 0;
557   border-bottom: 0;
558   padding: 0 $-xs;
559 }
560
561 .image-picker .none {
562   display: none;
563 }
564
565 .code-editor .CodeMirror {
566   height: auto;
567   min-height: 50vh;
568   border-bottom: 0;
569 }
570
571 .code-editor .lang-options {
572   overflow-y: scroll;
573   flex-basis: 200px;
574   flex-grow: 1;
575 }
576
577 .code-editor .lang-options button {
578   display: block;
579   padding: $-xs $-m;
580   border-bottom: 1px solid;
581   @include lightDark(color, #333, #AAA);
582   @include lightDark(border-bottom-color, #EEE, #000);
583   cursor: pointer;
584   width: 100%;
585   text-align: left;
586   font-family: $mono;
587   font-size: 0.7rem;
588   padding-left: 24px + $-xs;
589   &:hover, &.active {
590     background-color: var(--color-primary-light);
591     color: var(--color-primary);
592   }
593 }
594
595 .code-editor button.lang-option-favorite-toggle {
596   position: absolute;
597   top: 0;
598   left: 0;
599   width: 28px;
600   font-size: 1rem;
601   border: 0;
602   line-height: 1;
603   padding: 2px;
604   z-index: 2;
605   height: 100%;
606   text-align: center;
607   color: var(--color-primary);
608   svg {
609     margin: 0;
610   }
611 }
612
613 .code-editor button[data-favourite="true"] ~ .action-favourite,
614 .code-editor button[data-favourite="false"] ~ .action-unfavourite {
615   display: none;
616 }
617
618 .code-editor .action-favourite {
619   opacity: 0.5;
620 }
621 .code-editor button:hover ~ .action-favourite {
622   opacity: 1;
623 }
624
625 .code-editor label {
626   background-color: var(--color-primary-light);
627   width: 100%;
628   color: var(--color-primary);
629   padding: $-xxs $-s;
630   margin-bottom: 0;
631 }
632
633 .code-editor-language-list {
634   position: relative;
635   width: 160px;
636   z-index: 2;
637   align-items: stretch;
638 }
639
640 .code-editor-language-list input {
641   border-radius: 0;
642   border: 0;
643   border-bottom: 1px solid #DDD;
644   padding: $-xs $-s;
645   height: auto;
646 }
647
648 .code-editor-main {
649   flex: 1;
650   min-width: 0;
651   .cm-editor {
652     margin-bottom: 0;
653     z-index: 1;
654     max-width: 100%;
655     width: 100%;
656   }
657 }
658
659 .code-editor-body-wrap {
660   height: 80vh;
661 }
662
663 @include smaller-than($s) {
664   .code-editor .lang-options {
665     display: none;
666   }
667   .code-editor-body-wrap {
668     flex-direction: column;
669   }
670   .code-editor-language-list, .code-editor-language-list input {
671     width: 100%;
672   }
673 }
674
675 .comment-box {
676   border-radius: 4px;
677   border: 1px solid #DDD;
678   @include lightDark(border-color, #ddd, #000);
679   @include lightDark(background-color, #FFF, #222);
680   .content {
681     font-size: 0.666em;
682     p, ul, ol {
683       font-size: $fs-m;
684       margin: .5em 0;
685     }
686   }
687   .actions {
688     opacity: 0;
689     transition: opacity ease-in-out 120ms;
690   }
691   &:hover .actions, &:focus-within .actions {
692     opacity: 1;
693   }
694 }
695
696 .comment-box .header {
697   .meta {
698     img, a, span {
699       display: inline-block;
700       vertical-align: top;
701     }
702     a, span {
703       padding: $-xxs 0 $-xxs 0;
704       line-height: 1.6;
705     }
706     a { color: #666; }
707     span {
708       padding-inline-start: $-xxs;
709     }
710   }
711   .text-muted {
712     color: #999;
713   }
714 }
715
716 #tag-manager .drag-card {
717   max-width: 500px;
718 }
719
720 .template-item {
721   cursor: pointer;
722   position: relative;
723   &:hover, .template-item-actions button:hover {
724     background-color: #F2F2F2;
725   }
726   .template-item-actions {
727     position: absolute;
728     top: 0;
729     inset-inline-end: 0;
730     width: 50px;
731     height: 100%;
732     display: flex;
733     flex-direction: column;
734     border-inline-start: 1px solid;
735     @include lightDark(border-color, #ddd, #000);
736   }
737   .template-item-actions button {
738     cursor: pointer;
739     flex: 1;
740     @include lightDark(background-color, #FFF, #222);
741     border: 0;
742     border-top: 1px solid;
743     @include lightDark(border-color, #DDD, #000);
744   }
745   .template-item-actions button svg {
746     margin: 0;
747   }
748   .template-item-actions button:first-child {
749     border-top: 0;
750   }
751 }
752
753
754 .dropdown-search {
755   position: relative;
756 }
757 .dropdown-search-toggle-breadcrumb {
758   border: 1px solid transparent;
759   border-radius: 4px;
760   line-height: normal;
761   padding: $-xs;
762   &:hover {
763     border-color: #DDD;
764   }
765   .svg-icon {
766     margin-inline-end: 0;
767   }
768 }
769 .dropdown-search-toggle-select {
770   display: flex;
771   gap: $-s;
772   line-height: normal;
773   .svg-icon {
774     height: 26px;
775     width: 26px;
776     margin: 0;
777   }
778   .avatar {
779     height: 22px;
780     width: 22px;
781   }
782   .avatar + span {
783     max-width: 100%;
784     overflow: hidden;
785     text-overflow: ellipsis;
786     white-space: nowrap;
787   }
788   .dropdown-search-toggle-caret {
789     font-size: 1.15rem;
790   }
791 }
792 .dropdown-search-toggle-select-label {
793   min-width: 0;
794   white-space: nowrap;
795 }
796 .dropdown-search-toggle-select-caret {
797   line-height: 0;
798   margin-left: auto;
799   margin-top: -2px;
800   display: flex;
801   align-items: center;
802 }
803
804 .dropdown-search-dropdown {
805   box-shadow: $bs-med;
806   overflow: hidden;
807   min-height: 100px;
808   width: 240px;
809   display: none;
810   position: absolute;
811   z-index: 80;
812   right: 0;
813   top: 0;
814   margin-top: $-m;
815   @include rtl {
816     right: auto;
817     left: -$-m;
818   }
819   .dropdown-search-search .svg-icon {
820     position: absolute;
821     left: $-s;
822     @include rtl {
823       right: $-s;
824       left: auto;
825     }
826     top: 11px;
827     fill: #888;
828     pointer-events: none;
829   }
830   .dropdown-search-list {
831     max-height: 400px;
832     overflow-y: scroll;
833     text-align: start;
834   }
835   .dropdown-search-item {
836     padding: $-s $-m;
837     &:hover,&:focus {
838       background-color: #F2F2F2;
839       text-decoration: none;
840     }
841   }
842   input, input:focus {
843     padding-inline-start: $-xl;
844     border-radius: 0;
845     border: 0;
846     border-bottom: 1px solid #DDD;
847   }
848   input:focus {
849     outline: 0;
850   }
851 }
852
853 @include smaller-than($m) {
854   .dropdown-search-dropdown {
855     position: fixed;
856     right: auto;
857     left: $-m;
858   }
859   .dropdown-search-dropdown .dropdown-search-list {
860     max-height: 240px;
861   }
862 }
863
864 .item-list {
865   box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
866 }
867 .item-list-row {
868   border: 1.5px solid;
869   @include lightDark(border-color, #E2E2E2, #444);
870   border-bottom-width: 0;
871   label {
872     padding-bottom: 0;
873   }
874   &:hover {
875     @include lightDark(background-color, #F6F6F6, #333);
876   }
877 }
878 .item-list-row:first-child {
879   border-radius: 4px 4px 0 0;
880 }
881 .item-list-row:last-child {
882   border-radius: 0 0 4px 4px;
883   border-bottom-width: 1.5px;
884 }
885 .item-list-row:first-child:last-child {
886   border-radius: 4px;
887 }
888 .item-list-row-toggle-all {
889   visibility: hidden;
890 }
891 .item-list-row:hover .item-list-row-toggle-all {
892   visibility: visible;
893 }
894
895 .status-indicator-active, .status-indicator-inactive {
896   width: 8px;
897   height: 8px;
898   border-radius: 50%;
899   display: inline-block;
900 }
901 .status-indicator-active {
902   background-color: $positive;
903 }
904 .status-indicator-inactive {
905   background-color: $negative;
906 }
907
908 .shortcut-container {
909   background-color: rgba(0, 0, 0, 0.25);
910   pointer-events: none;
911   position: fixed;
912   left: 0;
913   top: 0;
914   width: 100%;
915   height: 100%;
916   z-index: 99;
917 }
918 .shortcut-linkage {
919   position: fixed;
920   box-shadow: 0 0 4px 0 #FFF;
921   border-radius: 3px;
922 }
923 .shortcut-hint {
924   position: fixed;
925   padding: $-xxs $-xxs;
926   font-size: .85rem;
927   font-weight: 700;
928   line-height: 1;
929   background-color: #eee;
930   border-radius: 3px;
931   border: 1px solid #b4b4b4;
932   box-shadow: 0 1px 1px rgba(0, 0, 0, .2), 0 2px 0 0 rgba(255, 255, 255, .7) inset;
933   color: #333;
934 }
935
936 // Back to top link
937 $btt-size: 40px;
938 .back-to-top {
939   background-color: var(--color-primary);
940   position: fixed;
941   bottom: $-m;
942   right: $-l;
943   padding: 5px 7px;
944   cursor: pointer;
945   color: #FFF;
946   fill: #FFF;
947   svg {
948     width: math.div($btt-size, 1.5);
949     height: math.div($btt-size, 1.5);
950     margin-inline-end: 4px;
951   }
952   width: $btt-size;
953   height: $btt-size;
954   border-radius: $btt-size;
955   transition: all ease-in-out 180ms;
956   opacity: 0;
957   z-index: 999;
958   overflow: hidden;
959   &:hover {
960     width: $btt-size*3.4;
961     opacity: 1 !important;
962   }
963   .inner {
964     width: $btt-size*3.4;
965   }
966   span {
967     position: relative;
968     vertical-align: top;
969     line-height: 2;
970   }
971 }
972
973 // Sortable scroll boxes
974 .scroll-box {
975   list-style: none;
976   padding: 0;
977   margin: 0;
978   max-height: 280px;
979   overflow-y: scroll;
980   border: 1px solid;
981   @include lightDark(border-color, #DDD, #000);
982   border-radius: 3px;
983   min-height: 20px;
984   @include lightDark(background-color, #EEE, #000);
985 }
986 .scroll-box-item {
987   border-bottom: 1px solid;
988   border-top: 1px solid;
989   @include lightDark(border-color, #DDD, #000);
990   margin-top: -1px;
991   @include lightDark(background-color, #FFF, #222);
992   display: flex;
993   align-items: flex-start;
994   padding: 1px;
995   &:last-child {
996     border-bottom: 0;
997   }
998   &:hover {
999     cursor: pointer;
1000     @include lightDark(background-color, #f8f8f8, #333);
1001   }
1002   .handle {
1003     color: #AAA;
1004     cursor: grab;
1005   }
1006   button {
1007     opacity: .6;
1008   }
1009   .handle svg {
1010     margin: 0;
1011   }
1012   > * {
1013     padding: $-xs $-m;
1014   }
1015   .handle + * {
1016     padding-left: 0;
1017   }
1018   &:hover .handle {
1019     @include lightDark(color, #444, #FFF);
1020   }
1021   &:hover button {
1022     opacity: 1;
1023   }
1024   a:hover {
1025     text-decoration: none;
1026   }
1027 }
1028
1029 input.scroll-box-search, .scroll-box-header-item {
1030   font-size: 0.8rem;
1031   border: 1px solid;
1032   @include lightDark(border-color, #DDD, #000);
1033   @include lightDark(background-color, #FFF, #222);
1034   margin-bottom: -1px;
1035   border-radius: 3px 3px 0 0;
1036   width: 100%;
1037   max-width: 100%;
1038   height: auto;
1039   line-height: 1.4;
1040   color: #666;
1041 }
1042
1043 .scroll-box-search + .scroll-box,
1044 .scroll-box-header-item + .scroll-box {
1045   border-radius: 0 0 3px 3px;
1046 }
1047
1048 .scroll-box[refs="shelf-sort@shelf-book-list"] [data-action="add"] {
1049   display: none;
1050 }
1051 .scroll-box[refs="shelf-sort@all-book-list"] [data-action="remove"],
1052 .scroll-box[refs="shelf-sort@all-book-list"] [data-action="move_up"],
1053 .scroll-box[refs="shelf-sort@all-book-list"] [data-action="move_down"],
1054 {
1055   display: none;
1056 }