]> BookStack Code Mirror - bookstack/blob - resources/sass/_blocks.scss
Added test for logical-theme-system command registration
[bookstack] / resources / sass / _blocks.scss
1
2 /**
3  * Callouts
4  */
5 .callout {
6   border-inline-start: 3px solid #BBB;
7   background-color: #EEE;
8   padding: $-s $-s $-s $-xl;
9   display: block;
10   position: relative;
11   overflow: auto;
12   &:before {
13     background-image: url('data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjQgMjQiIGZpbGw9IiMwMTUzODAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+ICAgIDxwYXRoIGQ9Ik0wIDBoMjR2MjRIMHoiIGZpbGw9Im5vbmUiLz4gICAgPHBhdGggZD0iTTEyIDJDNi40OCAyIDIgNi40OCAyIDEyczQuNDggMTAgMTAgMTAgMTAtNC40OCAxMC0xMFMxNy41MiAyIDEyIDJ6bTEgMTVoLTJ2LTZoMnY2em0wLThoLTJWN2gydjJ6Ii8+PC9zdmc+');
14     background-repeat: no-repeat;
15     content: '';
16     width: 1.2em;
17     height: 1.2em;
18     left: $-xs + 2px;
19     top: 50%;
20     margin-top: -9px;
21     display: inline-block;
22     position: absolute;
23     line-height: 1;
24     opacity: 0.8;
25   }
26   &.success {
27     border-left-color: $positive;
28     @include lightDark(background-color, lighten($positive, 68%), darken($positive, 22%));
29     @include lightDark(color, darken($positive, 16%), lighten($positive, 5%));
30   }
31   &.success:before {
32     background-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjQgMjQiIGZpbGw9IiMzNzZjMzkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+ICAgIDxwYXRoIGQ9Ik0wIDBoMjR2MjRIMHoiIGZpbGw9Im5vbmUiLz4gICAgPHBhdGggZD0iTTEyIDJDNi40OCAyIDIgNi40OCAyIDEyczQuNDggMTAgMTAgMTAgMTAtNC40OCAxMC0xMFMxNy41MiAyIDEyIDJ6bS0yIDE1bC01LTUgMS40MS0xLjQxTDEwIDE0LjE3bDcuNTktNy41OUwxOSA4bC05IDl6Ii8+PC9zdmc+");
33   }
34   &.danger {
35     border-left-color: $negative;
36     @include lightDark(background-color, lighten($negative, 56%), darken($negative, 30%));
37     @include lightDark(color, darken($negative, 20%), lighten($negative, 5%));
38   }
39   &.danger:before {
40     background-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjQgMjQiIGZpbGw9IiNiOTE4MTgiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+ICAgIDxwYXRoIGQ9Ik0xNS43MyAzSDguMjdMMyA4LjI3djcuNDZMOC4yNyAyMWg3LjQ2TDIxIDE1LjczVjguMjdMMTUuNzMgM3pNMTIgMTcuM2MtLjcyIDAtMS4zLS41OC0xLjMtMS4zIDAtLjcyLjU4LTEuMyAxLjMtMS4zLjcyIDAgMS4zLjU4IDEuMyAxLjMgMCAuNzItLjU4IDEuMy0xLjMgMS4zem0xLTQuM2gtMlY3aDJ2NnoiLz4gICAgPHBhdGggZD0iTTAgMGgyNHYyNEgweiIgZmlsbD0ibm9uZSIvPjwvc3ZnPg==");
41   }
42   &.info {
43     border-left-color: $info;
44     @include lightDark(color, darken($info, 20%), lighten($info, 10%));
45     @include lightDark(background-color, lighten($info, 50%), darken($info, 35%));
46   }
47   &.warning {
48     border-left-color: $warning;
49     @include lightDark(background-color, lighten($warning, 50%), darken($warning, 36%));
50     @include lightDark(color, darken($warning, 20%), $warning);
51   }
52   &.warning:before {
53     background-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjQgMjQiIGZpbGw9IiNiNjUzMWMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+ICAgIDxwYXRoIGQ9Ik0wIDBoMjR2MjRIMHoiIGZpbGw9Im5vbmUiLz4gICAgPHBhdGggZD0iTTEgMjFoMjJMMTIgMiAxIDIxem0xMi0zaC0ydi0yaDJ2MnptMC00aC0ydi00aDJ2NHoiLz48L3N2Zz4=");
54   }
55   a {
56     color: inherit;
57     text-decoration: underline;
58   }
59 }
60
61 /**
62  * Card-style blocks
63  */
64
65 .card {
66   @include lightDark(background-color, #FFF, #222);
67   box-shadow: $bs-card;
68   border-radius: 3px;
69   border: 1px solid transparent;
70   .body, p.empty-text {
71     padding: $-m;
72   }
73   a, p {
74     word-wrap: break-word;
75     word-break: break-word;
76   }
77 }
78
79 .card-title {
80   padding: $-m $-m $-xs;
81   margin: 0;
82   font-size: $fs-m;
83   color: #222;
84   fill: #222;
85   font-weight: 400;
86 }
87 .card-title a {
88   line-height: 1;
89 }
90
91 .card.border-card {
92   border: 1px solid #DDD;
93 }
94
95 .card.drag-card {
96   border: 1px solid #DDD;
97   @include lightDark(border-color, #ddd, #000);
98   @include lightDark(background-color, #fff, #333);
99   border-radius: 4px;
100   display: flex;
101   padding: 0 0 0 ($-s + 28px);
102   margin: $-s 0;
103   position: relative;
104   .drag-card-action {
105     cursor: pointer;
106   }
107   .handle, .drag-card-action {
108     display: flex;
109     align-items: center;
110     text-align: center;
111     justify-content: center;
112     width: 28px;
113     flex-grow: 0;
114     padding: 0 $-xs;
115     &:hover {
116       background-color: #EEE;
117     }
118     .svg-icon {
119       margin-inline-end: 0px;
120     }
121   }
122   .outline input {
123     margin: $-s 0;
124     width: 100%;
125   }
126   .outline {
127     position: relative;
128   }
129   .handle {
130     @include lightDark(background-color, #eee, #2d2d2d);
131     left: 0;
132     position: absolute;
133     top: 0;
134     bottom: 0;
135   }
136   > div {
137     padding: 0 $-s;
138     max-width: 80%;
139     flex: 1;
140   }
141 }
142
143 .grid-card {
144   display: flex;
145   flex-direction: column;
146   border: 1px solid #ddd;
147   @include lightDark(border-color, #ddd, #000);
148   margin-bottom: $-l;
149   border-radius: 4px;
150   overflow: hidden;
151   min-width: 100px;
152   color: $text-dark;
153   transition: border-color ease-in-out 120ms, box-shadow ease-in-out 120ms;
154   &:hover {
155     color: $text-dark;
156     text-decoration: none;
157     @include lightDark(box-shadow, $bs-card, $bs-card-dark);
158   }
159   h2 {
160     width: 100%;
161     font-size: 1.5em;
162     margin: 0 0 10px;
163   }
164   p {
165     font-size: .7rem;
166     margin: 0;
167     line-height: 1.6em;
168   }
169   .grid-card-content {
170     flex: 1;
171     border-top: 0;
172     border-bottom-width: 2px;
173   }
174   .grid-card-content, .grid-card-footer {
175     padding: $-l;
176   }
177   .grid-card-content + .grid-card-footer {
178     padding-top: 0;
179   }
180 }
181
182 .book-grid-item .grid-card-footer {
183   p.small {
184     font-size: .8em;
185     margin: 0;
186   }
187 }
188
189 .content-wrap.card {
190   padding: $-m $-xxl;
191   margin-inline-start: auto;
192   margin-inline-end: auto;
193   margin-bottom: $-l;
194   overflow: initial;
195   min-height: 60vh;
196   &.auto-height {
197     min-height: 0;
198   }
199   &.fill-width {
200     width: 100%;
201   }
202 }
203 @include smaller-than($xxl) {
204   .content-wrap.card {
205     padding: $-m $-xl;
206   }
207 }
208 @include smaller-than($m) {
209   .content-wrap.card {
210     padding: $-m $-l;
211   }
212 }
213 @include smaller-than($s) {
214   .content-wrap.card {
215     padding: $-m $-m;
216   }
217 }
218
219 .outline-hover {
220   border: 1px solid transparent !important;
221   &:hover {
222     border: 1px solid rgba(0, 0, 0, 0.1) !important;
223   }
224 }
225
226 .fade-in-when-active {
227   opacity: 0.6;
228   transition: opacity ease-in-out 120ms;
229   &:hover, &:focus-within {
230     opacity: 1;
231   }
232 }
233
234 /**
235  * Tags
236  */
237 .tag-item {
238   display: inline-flex;
239   margin-bottom: $-xs;
240   margin-inline-end: $-xs;
241   border-radius: 4px;
242   border: 1px solid;
243   overflow: hidden;
244   font-size: 0.85em;
245   @include lightDark(border-color, #CCC, #666);
246   a, span, a:hover, a:active {
247     padding: 4px 8px;
248     @include lightDark(color, rgba(0, 0, 0, 0.7), rgba(255, 255, 255, 0.8));
249     transition: background-color ease-in-out 80ms;
250     text-decoration: none;
251   }
252   a:hover {
253     @include lightDark(background-color, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.3));
254   }
255   svg {
256     @include lightDark(fill, rgba(0, 0, 0, 0.5), rgba(255, 255, 255, 0.5));
257   }
258   .tag-value {
259     border-inline-start: 1px solid;
260     @include lightDark(border-color, #DDD, #666);
261     @include lightDark(background-color, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.2))
262   }
263 }
264
265 .tag-name.highlight, .tag-value.highlight {
266   font-weight: bold;
267 }
268
269 .tag-list div:last-child .tag-item {
270   margin-bottom: 0;
271 }
272
273 td .tag-item {
274   margin-bottom: 0;
275 }
276
277 /**
278  * Pill boxes
279  */
280
281 .pill {
282   display: inline-block;
283   border: 1px solid currentColor;
284   padding: .2em .8em;
285   font-size: 0.8em;
286   border-radius: 1rem;
287   position: relative;
288   overflow: hidden;
289   line-height: 1.4;
290   &:before {
291     content: '';
292     background-color: currentColor;
293     position: absolute;
294     top: 0;
295     left: 0;
296     width: 100%;
297     height: 100%;
298     opacity: 0.1;
299   }
300 }
301
302 /**
303  * API Docs
304  */
305 .api-method {
306   font-size: 0.75rem;
307   background-color: #888;
308   padding: $-xs;
309   line-height: 1.3;
310   opacity: 0.7;
311   vertical-align: top;
312   border-radius: 3px;
313   color: #FFF;
314   display: inline-block;
315   min-width: 60px;
316   text-align: center;
317   font-weight: bold;
318   &[data-method="GET"] { background-color: #077b70 }
319   &[data-method="POST"] { background-color: #cf4d03 }
320   &[data-method="PUT"] { background-color: #0288D1 }
321   &[data-method="DELETE"] { background-color: #ab0f0e }
322 }
323
324 .sticky-sidebar {
325   position: sticky;
326   top: $-m;
327   max-height: calc(100vh - #{$-m});
328   overflow-y: auto;
329 }
Morty Proxy This is a proxified and sanitized view of the page, visit original site.