]> BookStack Code Mirror - bookstack/blob - resources/sass/_blocks.scss
Fix Crowdin name in the language_request issue template
[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   .body, p.empty-text {
70     padding: $-m;
71   }
72   a, p {
73     word-wrap: break-word;
74     word-break: break-word;
75   }
76 }
77
78 .card-title {
79   padding: $-m $-m $-xs;
80   margin: 0;
81   font-size: $fs-m;
82   color: #222;
83   fill: #222;
84   font-weight: 400;
85 }
86 .card-title a {
87   line-height: 1;
88 }
89 .card-footer-link {
90   display: block;
91   padding: $-s $-m;
92   line-height: 1;
93   border-top: 1px solid;
94   @include lightDark(border-color, #DDD, #555);
95   border-radius: 0 0 3px 3px;
96   font-size: 0.9em;
97   margin-top: $-xs;
98   &:hover {
99     text-decoration: none;
100     @include lightDark(background-color, #f2f2f2, #2d2d2d);
101   }
102 }
103
104 .card.border-card {
105   border: 1px solid #DDD;
106 }
107
108 .card.drag-card {
109   border: 1px solid #DDD;
110   @include lightDark(border-color, #ddd, #000);
111   @include lightDark(background-color, #fff, #333);
112   border-radius: 4px;
113   display: flex;
114   padding: 0 0 0 ($-s + 28px);
115   margin: $-s 0;
116   position: relative;
117   .drag-card-action {
118     cursor: pointer;
119   }
120   .handle, .drag-card-action {
121     display: flex;
122     align-items: center;
123     text-align: center;
124     justify-content: center;
125     width: 28px;
126     flex-grow: 0;
127     padding: 0 $-xs;
128     &:hover {
129       background-color: #EEE;
130     }
131     .svg-icon {
132       margin-inline-end: 0px;
133     }
134   }
135   .outline input {
136     margin: $-s 0;
137     width: 100%;
138   }
139   .outline {
140     position: relative;
141   }
142   .handle {
143     @include lightDark(background-color, #eee, #2d2d2d);
144     left: 0;
145     position: absolute;
146     top: 0;
147     bottom: 0;
148   }
149   > div {
150     padding: 0 $-s;
151     max-width: 80%;
152     flex: 1;
153   }
154 }
155
156 .grid-card {
157   display: flex;
158   flex-direction: column;
159   border: 1px solid #ddd;
160   @include lightDark(border-color, #ddd, #000);
161   margin-bottom: $-l;
162   border-radius: 4px;
163   overflow: hidden;
164   min-width: 100px;
165   color: $text-dark;
166   transition: border-color ease-in-out 120ms, box-shadow ease-in-out 120ms;
167   &:hover {
168     color: $text-dark;
169     text-decoration: none;
170     @include lightDark(box-shadow, $bs-card, $bs-card-dark);
171   }
172   h2 {
173     width: 100%;
174     font-size: 1.5em;
175     margin: 0 0 10px;
176   }
177   p {
178     font-size: .7rem;
179     margin: 0;
180     line-height: 1.6em;
181   }
182   .grid-card-content {
183     flex: 1;
184     border-top: 0;
185     border-bottom-width: 2px;
186   }
187   .grid-card-content, .grid-card-footer {
188     padding: $-l;
189   }
190   .grid-card-content + .grid-card-footer {
191     padding-top: 0;
192   }
193 }
194
195 .book-grid-item .grid-card-footer {
196   p.small {
197     font-size: .8em;
198     margin: 0;
199   }
200 }
201
202 .content-wrap.card {
203   padding: $-m $-xxl;
204   margin-inline-start: auto;
205   margin-inline-end: auto;
206   margin-bottom: $-l;
207   overflow: initial;
208   min-height: 60vh;
209   &.auto-height {
210     min-height: 0;
211   }
212   &.fill-width {
213     width: 100%;
214   }
215 }
216 @include smaller-than($xxl) {
217   .content-wrap.card {
218     padding: $-m $-xl;
219   }
220 }
221 @include smaller-than($m) {
222   .content-wrap.card {
223     padding: $-m $-l;
224   }
225 }
226 @include smaller-than($s) {
227   .content-wrap.card {
228     padding: $-m $-m;
229   }
230 }
231
232 .outline-hover {
233   border: 1px solid transparent !important;
234   &:hover {
235     border: 1px solid rgba(0, 0, 0, 0.1) !important;
236   }
237 }
238
239 .fade-in-when-active {
240   @include lightDark(opacity, 0.6, 0.7);
241   transition: opacity ease-in-out 120ms;
242   &:hover, &:focus-within {
243     opacity: 1 !important;
244   }
245   @media (prefers-contrast: more) {
246     opacity: 1 !important;
247   }
248 }
249
250 /**
251  * Tags
252  */
253 .tag-item {
254   display: inline-flex;
255   margin-bottom: $-xs;
256   margin-inline-end: $-xs;
257   border-radius: 4px;
258   border: 1px solid;
259   overflow: hidden;
260   font-size: 0.85em;
261   @include lightDark(border-color, #CCC, #666);
262   a, span, a:hover, a:active {
263     padding: 4px 8px;
264     @include lightDark(color, rgba(0, 0, 0, 0.7), rgba(255, 255, 255, 0.8));
265     transition: background-color ease-in-out 80ms;
266     text-decoration: none;
267   }
268   a:hover {
269     @include lightDark(background-color, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.3));
270   }
271   svg {
272     @include lightDark(fill, rgba(0, 0, 0, 0.5), rgba(255, 255, 255, 0.5));
273   }
274   .tag-value {
275     border-inline-start: 1px solid;
276     @include lightDark(border-color, #DDD, #666);
277     @include lightDark(background-color, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.2))
278   }
279 }
280
281 .tag-name.highlight, .tag-value.highlight {
282   font-weight: bold;
283 }
284
285 .tag-list div:last-child .tag-item {
286   margin-bottom: 0;
287 }
288
289 td .tag-item {
290   margin-bottom: 0;
291 }
292
293 /**
294  * Pill boxes
295  */
296
297 .pill {
298   display: inline-block;
299   border: 1px solid currentColor;
300   padding: .2em .8em;
301   font-size: 0.8em;
302   border-radius: 1rem;
303   position: relative;
304   overflow: hidden;
305   line-height: 1.4;
306   &:before {
307     content: '';
308     background-color: currentColor;
309     position: absolute;
310     top: 0;
311     left: 0;
312     width: 100%;
313     height: 100%;
314     opacity: 0.1;
315   }
316 }
317
318 /**
319  * API Docs
320  */
321 .api-method {
322   font-size: 0.75rem;
323   background-color: #888;
324   padding: $-xs;
325   line-height: 1.3;
326   opacity: 0.7;
327   vertical-align: top;
328   border-radius: 3px;
329   color: #FFF;
330   display: inline-block;
331   min-width: 60px;
332   text-align: center;
333   font-weight: bold;
334   &[data-method="GET"] { background-color: #077b70 }
335   &[data-method="POST"] { background-color: #cf4d03 }
336   &[data-method="PUT"] { background-color: #0288D1 }
337   &[data-method="DELETE"] { background-color: #ab0f0e }
338 }
339
340 .sticky-sidebar {
341   position: sticky;
342   top: $-m;
343   max-height: calc(100vh - #{$-m});
344   overflow-y: auto;
345 }
Morty Proxy This is a proxified and sanitized view of the page, visit original site.