]> BookStack Code Mirror - bookstack/blob - resources/sass/styles.scss
Merge pull request #4002 from BookStackApp/color_upgrades
[bookstack] / resources / sass / styles.scss
1 @use "sass:math";
2
3 @import "reset";
4 @import "variables";
5 @import "mixins";
6 @import "spacing";
7 @import "opacity";
8 @import "html";
9 @import "text";
10 @import "colors";
11 @import "layout";
12 @import "blocks";
13 @import "buttons";
14 @import "tables";
15 @import "forms";
16 @import "animations";
17 @import "tinymce";
18 @import "codemirror";
19 @import "components";
20 @import "header";
21 @import "footer";
22 @import "lists";
23 @import "pages";
24
25 // Jquery Sortable Styles
26 .dragged {
27   position: absolute;
28   opacity: 0.5;
29   z-index: 2000;
30 }
31 body.dragging, body.dragging * {
32   cursor: move !important;
33 }
34
35 // User Avatar Images
36 .avatar {
37   border-radius: 100%;
38   @include lightDark(background-color, #eee, #000);
39   width: 30px;
40   height: 30px;
41   &.med {
42     width: 40px;
43     height: 40px;
44   }
45   &.large {
46     width: 80px;
47     height: 80px;
48   }
49   &.huge {
50     width: 120px;
51     height: 120px;
52   }
53   &.square {
54     border-radius: 3px;
55   }
56   &[src$="user_avatar.png"] {
57     @include whenDark {
58       filter: invert(1);
59     }
60   }
61 }
62
63 // Loading icon
64 $loadingSize: 10px;
65 .loading-container {
66   position: relative;
67   display: block;
68   margin: $-xl auto;
69   > div {
70     width: $loadingSize;
71     height: $loadingSize;
72     border-radius: $loadingSize;
73     display: inline-block;
74     vertical-align: top;
75     transform: translate3d(-10px, 0, 0);
76     margin-top: $-xs;
77     animation-name: loadingBob;
78     animation-duration: 1.4s;
79     animation-iteration-count: infinite;
80     animation-timing-function: cubic-bezier(.62, .28, .23, .99);
81     margin-inline-end: 4px;
82     background-color: var(--color-page);
83     animation-delay: -300ms;
84   }
85   > div:first-child {
86       left: -($loadingSize+$-xs);
87       background-color: var(--color-book);
88       animation-delay: -600ms;
89   }
90   > div:last-of-type {
91     left: $loadingSize+$-xs;
92     background-color: var(--color-chapter);
93     animation-delay: 0ms;
94   }
95   > span {
96     margin-inline-start: $-s;
97     font-style: italic;
98     color: #888;
99     vertical-align: top;
100   }
101 }
102
103 .skip-to-content-link {
104   position: fixed;
105   top: -52px;
106   left: 0;
107   background-color: #FFF;
108   z-index: 15;
109   border-radius: 0 4px 4px 0;
110   display: block;
111   box-shadow: $bs-dark;
112   font-weight: bold;
113   &:focus {
114     top: $-xl;
115     outline-offset: -10px;
116     outline: 2px dotted var(--color-link);
117   }
118 }
119
120 .contained-search-box {
121   display: flex;
122   height: 38px;
123   input, button {
124     border-radius: 0;
125     border: 1px solid #ddd;
126     @include lightDark(border-color, #ddd, #000);
127     margin-inline-start: -1px;
128   }
129   input {
130     flex: 5;
131     padding: $-xs $-s;
132     &:focus, &:active {
133       outline: 0;
134     }
135   }
136   button {
137     width: 60px;
138   }
139   button i {
140     padding: 0;
141   }
142   button.cancel.active {
143     background-color: $negative;
144     color: #EEE;
145   }
146   svg {
147     margin: 0;
148   }
149 }
150
151 .entity-selector {
152   border: 1px solid #DDD;
153   @include lightDark(border-color, #ddd, #111);
154   border-radius: 3px;
155   overflow: hidden;
156   font-size: 0.8em;
157   input[type="text"] {
158     width: 100%;
159     display: block;
160     border-radius: 0;
161     border: 0;
162     border-bottom: 1px solid #DDD;
163     font-size: 16px;
164     padding: $-s $-m;
165   }
166   .entity-list {
167     overflow-y: scroll;
168     height: 400px;
169     @include lightDark(background-color, #eee, #222);
170     margin-inline-end: 0;
171     margin-inline-start: 0;
172   }
173   .entity-list-item {
174     @include lightDark(background-color, #fff, #222);
175   }
176   .entity-list-item p {
177     margin-bottom: 0;
178   }
179   .entity-list-item:focus {
180     outline: 2px dotted var(--color-primary);
181     outline-offset: -4px;
182   }
183   .entity-list-item.selected {
184     @include lightDark(background-color, rgba(0, 0, 0, 0.05), rgba(255, 255, 255, 0.05));
185   }
186   .loading {
187     height: 400px;
188     padding-top: $-l;
189   }
190   &.compact {
191     font-size: 10px;
192     .entity-item-snippet {
193       display: none;
194     }
195     h4 {
196       font-size: 14px;
197     }
198   }
199 }
200
201 .scroll-box {
202   max-height: 250px;
203   overflow-y: scroll;
204   border: 1px solid;
205   @include lightDark(border-color, #DDD, #000);
206   border-radius: 3px;
207   min-height: 20px;
208   @include lightDark(background-color, #EEE, #000);
209 }
210 .scroll-box-item {
211   border-bottom: 1px solid;
212   border-top: 1px solid;
213   @include lightDark(border-color, #DDD, #000);
214   margin-top: -1px;
215   @include lightDark(background-color, #FFF, #222);
216   display: flex;
217   padding: 1px;
218   &:last-child {
219     border-bottom: 0;
220   }
221   &:hover {
222     cursor: pointer;
223     @include lightDark(background-color, #f8f8f8, #333);
224   }
225   .handle {
226     color: #AAA;
227     cursor: grab;
228   }
229   .handle svg {
230     margin: 0;
231   }
232   > * {
233     padding: $-xs $-m;
234   }
235   .handle + * {
236     padding-left: 0;
237   }
238   &:hover .handle {
239     @include lightDark(color, #444, #FFF);
240   }
241   a:hover {
242     text-decoration: none;
243   }
244 }
245
246 input.scroll-box-search, .scroll-box-header-item {
247   font-size: 0.8rem;
248   padding: $-xs $-m;
249   border: 1px solid;
250   @include lightDark(border-color, #DDD, #000);
251   @include lightDark(background-color, #FFF, #222);
252   margin-bottom: -1px;
253   border-radius: 3px 3px 0 0;
254   width: 100%;
255   max-width: 100%;
256   height: auto;
257   line-height: 1.4;
258   color: #666;
259 }
260
261 .scroll-box-search + .scroll-box,
262 .scroll-box-header-item + .scroll-box {
263   border-radius: 0 0 3px 3px;
264 }
265
266 .fullscreen {
267   border:0;
268   position:fixed;
269   top:0;
270   left:0;
271   right:0;
272   bottom:0;
273   width:100%;
274   height:100%;
275   z-index: 150;
276 }
277
278 .list-sort-container {
279   display: inline-block;
280   form {
281     display: inline-block;
282   }
283   .list-sort {
284     display: inline-grid;
285     margin-inline-start: $-s;
286     grid-template-columns: minmax(120px, max-content) 40px;
287     font-size: 0.9rem;
288     border: 2px solid #DDD;
289     @include lightDark(border-color, #ddd, #444);
290     border-radius: 4px;
291   }
292   .list-sort-label {
293     font-weight: bold;
294     display: inline-block;
295     @include lightDark(color, #555, #888);
296   }
297   .list-sort-type {
298     text-align: start;
299   }
300   .list-sort-type, .list-sort-dir {
301     padding: $-xs $-s;
302     cursor: pointer;
303   }
304   .list-sort-dir {
305     border-inline-start: 2px solid #DDD;
306     color: #888;
307     @include lightDark(border-color, #ddd, #444);
308     .svg-icon {
309       transition: transform ease-in-out 120ms;
310     }
311     &:hover .svg-icon {
312       transform: rotate(180deg);
313     }
314   }
315 }