]> BookStack Code Mirror - bookstack/blob - resources/sass/_blocks.scss
removed test_slug_multi_byte_lower_casing and added new test test_slug_multi_byte_ur...
[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 }
56
57 /**
58  * Card-style blocks
59  */
60
61 .card {
62   @include lightDark(background-color, #FFF, #222);
63   box-shadow: $bs-card;
64   border-radius: 3px;
65   border: 1px solid transparent;
66   .body, p.empty-text {
67     padding: $-m;
68   }
69   a, p {
70     word-wrap: break-word;
71     word-break: break-word;
72   }
73 }
74
75 .card-title {
76   padding: $-m $-m $-xs;
77   margin: 0;
78   font-size: $fs-m;
79   color: #222;
80   fill: #222;
81   font-weight: 400;
82 }
83 .card-title a {
84   line-height: 1;
85 }
86
87 .card.border-card {
88   border: 1px solid #DDD;
89 }
90
91 .card.drag-card {
92   border: 1px solid #DDD;
93   @include lightDark(border-color, #ddd, #000);
94   @include lightDark(background-color, #fff, #333);
95   border-radius: 4px;
96   display: flex;
97   padding: 0 0 0 ($-s + 28px);
98   margin: $-s 0;
99   position: relative;
100   .drag-card-action {
101     cursor: pointer;
102   }
103   .handle, .drag-card-action {
104     display: flex;
105     align-items: center;
106     text-align: center;
107     justify-content: center;
108     width: 28px;
109     flex-grow: 0;
110     padding: 0 $-xs;
111     &:hover {
112       background-color: #EEE;
113     }
114     .svg-icon {
115       margin-inline-end: 0px;
116     }
117   }
118   > div .outline input {
119     margin: $-s 0;
120     width: 100%;
121   }
122   .handle {
123     @include lightDark(background-color, #eee, #2d2d2d);
124     left: 0;
125     position: absolute;
126     top: 0;
127     bottom: 0;
128   }
129   > div {
130     padding: 0 $-s;
131     max-width: 80%;
132     flex: 1;
133   }
134 }
135
136 .grid-card {
137   display: flex;
138   flex-direction: column;
139   border: 1px solid #ddd;
140   @include lightDark(border-color, #ddd, #000);
141   margin-bottom: $-l;
142   border-radius: 4px;
143   overflow: hidden;
144   min-width: 100px;
145   color: $text-dark;
146   transition: border-color ease-in-out 120ms, box-shadow ease-in-out 120ms;
147   &:hover {
148     color: $text-dark;
149     text-decoration: none;
150     @include lightDark(box-shadow, $bs-card, $bs-card-dark);
151   }
152   h2 {
153     width: 100%;
154     font-size: 1.5em;
155     margin: 0 0 10px;
156   }
157   p {
158     font-size: .7rem;
159     margin: 0;
160     line-height: 1.6em;
161   }
162   .grid-card-content {
163     flex: 1;
164     border-top: 0;
165     border-bottom-width: 2px;
166   }
167   .grid-card-content, .grid-card-footer {
168     padding: $-l;
169   }
170   .grid-card-content + .grid-card-footer {
171     padding-top: 0;
172   }
173 }
174
175 .book-grid-item .grid-card-footer {
176   p.small {
177     font-size: .8em;
178     margin: 0;
179   }
180 }
181
182 .content-wrap.card {
183   padding: $-m $-xxl;
184   margin-inline-start: auto;
185   margin-inline-end: auto;
186   margin-bottom: $-xl;
187   overflow: initial;
188   min-height: 60vh;
189   &.auto-height {
190     min-height: 0;
191   }
192   &.fill-width {
193     width: 100%;
194   }
195 }
196 @include smaller-than($xxl) {
197   .content-wrap.card {
198     padding: $-m $-xl;
199   }
200 }
201 @include smaller-than($m) {
202   .content-wrap.card {
203     padding: $-m $-l;
204   }
205 }
206 @include smaller-than($s) {
207   .content-wrap.card {
208     padding: $-m $-m;
209   }
210 }
211
212 /**
213  * Tags
214  */
215 .tag-item {
216   display: inline-flex;
217   margin-bottom: $-xs;
218   margin-inline-end: $-xs;
219   border-radius: 4px;
220   border: 1px solid #CCC;
221   overflow: hidden;
222   font-size: 0.85em;
223   a, a:hover, a:active {
224     padding: 4px 8px;
225     @include lightDark(color, #777, #999);
226     transition: background-color ease-in-out 80ms;
227     text-decoration: none;
228   }
229   a:hover {
230     @include lightDark(background-color, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.3));
231   }
232   svg {
233     fill: #888;
234   }
235   .tag-value {
236     border-inline-start: 1px solid #DDD;
237     @include lightDark(background-color, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.2))
238   }
239 }
240
241 .tag-list div:last-child .tag-item {
242   margin-bottom: 0;
243 }
244
245 /**
246  * API Docs
247  */
248 .api-method {
249   font-size: 0.75rem;
250   background-color: #888;
251   padding: $-xs;
252   line-height: 1.3;
253   opacity: 0.7;
254   vertical-align: top;
255   border-radius: 3px;
256   color: #FFF;
257   display: inline-block;
258   min-width: 60px;
259   text-align: center;
260   font-weight: bold;
261   &[data-method="GET"] { background-color: #077b70 }
262   &[data-method="POST"] { background-color: #cf4d03 }
263   &[data-method="PUT"] { background-color: #0288D1 }
264   &[data-method="DELETE"] { background-color: #ab0f0e }
265 }
266
267 .sticky-sidebar {
268   position: sticky;
269   top: $-m;
270 }