]> BookStack Code Mirror - bookstack/blob - resources/sass/_text.scss
Add prev and next button to navigate through different pages
[bookstack] / resources / sass / _text.scss
1 /**
2  * Fonts
3  */
4
5 body, button, input, select, label, textarea {
6   font-family: $text;
7 }
8 .Codemirror, pre, #markdown-editor-input, .editor-toolbar, .code-base {
9   font-family: $mono;
10 }
11
12 /*
13  * Header Styles
14  */
15
16 h1 {
17   font-size: 3.425em;
18   line-height: 1.22222222em;
19   margin-top: 0.48888889em;
20   margin-bottom: 0.48888889em;
21 }
22 h2 {
23   font-size: 2.8275em;
24   line-height: 1.294117647em;
25   margin-top: 0.8627451em;
26   margin-bottom: 0.43137255em;
27 }
28 h3 {
29   font-size: 2.333em;
30   line-height: 1.221428572em;
31   margin-top: 0.78571429em;
32   margin-bottom: 0.43137255em;
33 }
34 h4 {
35   font-size: 1.666em;
36   line-height: 1.375em;
37   margin-top: 0.78571429em;
38   margin-bottom: 0.43137255em;
39 }
40
41 h1, h2, h3, h4, h5, h6 {
42   font-weight: 400;
43   position: relative;
44   display: block;
45   @include lightDark(color, #222, #BBB);
46   .subheader {
47     font-size: 0.5em;
48     line-height: 1em;
49     color: lighten($text-dark, 32%);
50   }
51 }
52
53 h5 {
54   font-size: 1.4em;
55 }
56
57 h5, h6 {
58   line-height: 1.2em;
59   margin-top: 0.78571429em;
60   margin-bottom: 0.66em;
61 }
62
63 @include smaller-than($s) {
64   h1 {
65     font-size: 2.8275em;
66   }
67   h2 {
68     font-size: 2.333em;
69   }
70   h3 {
71     font-size: 1.666em;
72   }
73   h4 {
74     font-size: 1.333em;
75   }
76   h5 {
77     font-size: 1.161616em;
78   }
79 }
80
81 .list-heading {
82   font-size: 2rem;
83 }
84
85 h2.list-heading {
86   font-size: 1.333rem;
87 }
88
89 /*
90  * Link styling
91  */
92 a {
93   color: var(--color-primary);
94   fill: currentColor;
95   cursor: pointer;
96   text-decoration: none;
97   transition: filter ease-in-out 80ms;
98   line-height: 1.6;
99   &:hover {
100     text-decoration: underline;
101   }
102   &.icon {
103     display: inline-block;
104   }
105   svg {
106     position: relative;
107     display: inline-block;
108   }
109   &:focus img:only-child {
110     outline: 2px dashed var(--color-primary);
111     outline-offset: 2px;
112   }
113 }
114
115 a.disabled {
116   pointer-events: none;
117   cursor: default;
118   opacity: 0.6;
119 }
120
121 .blended-links a {
122   color: inherit;
123   svg {
124     fill: currentColor;
125   }
126 }
127
128 /*
129  * Other HTML Text Elements
130  */
131 p, ul, ol, pre, table, blockquote {
132   margin-top: 0.3em;
133   margin-bottom: 1.375em;
134 }
135
136 hr {
137   border: 0;
138   height: 1px;
139   @include lightDark(background, #eaeaea, #555);
140   margin-bottom: $-l;
141   &.faded {
142     background-image: linear-gradient(to right, #FFF, #e3e0e0 20%, #e3e0e0 80%, #FFF);
143   }
144   &.margin-top, &.even {
145     margin-top: $-l;
146   }
147 }
148
149 strong, b, .bold, .strong {
150   font-weight: bold;
151   > strong, > b, > .bold, > .strong {
152     font-weight: bolder;
153   }
154 }
155
156 em, i, .italic {
157   font-style: italic;
158 }
159
160 small, p.small, span.small, .text-small {
161   font-size: 0.75rem;
162   @include lightDark(color, #5e5e5e, #999);
163 }
164
165 sup, .superscript {
166   vertical-align: super;
167   font-size: 0.8em;
168 }
169
170 sub, .subscript {
171   vertical-align: sub;
172   font-size: 0.8em;
173 }
174
175 pre {
176   font-size: 12px;
177   border: 1px solid #DDD;
178   @include lightDark(background-color, #f5f5f5, #2B2B2B);
179   @include lightDark(border-color, #DDD, #111);
180   padding-left: 31px;
181   position: relative;
182   padding-top: 3px;
183   padding-bottom: 3px;
184   &:after {
185     content: '';
186     display: block;
187     position: absolute;
188     top: 0;
189     width: 29px;
190     left: 0;
191     height: 100%;
192     @include lightDark(background-color, #f5f5f5, #313335);
193     @include lightDark(border-right, 1px solid #DDD, none);
194   }
195 }
196
197 @media print {
198   pre {
199     padding-left: 12px;
200   }
201   pre:after {
202     display: none;
203   }
204 }
205
206 blockquote {
207   display: block;
208   position: relative;
209   border-left: 4px solid var(--color-primary);
210   @include lightDark(background-color, #f8f8f8, #333);
211   padding: $-s $-m $-s $-xl;
212   overflow: auto;
213   &:before {
214     content: "\201C";
215     font-size: 2em;
216     font-weight: bold;
217     position: absolute;
218     top: $-s;
219     left: $-s;
220     color: lighten($text-dark, 20%);
221   }
222 }
223
224 .text-mono {
225   font-family: $mono;
226 }
227
228 .text-uppercase {
229   text-transform: uppercase;
230 }
231
232 .text-capitals {
233   text-transform: capitalize;
234 }
235
236 .code-base {
237   font-size: 0.84em;
238   border: 1px solid #DDD;
239   border-radius: 3px;
240   @include lightDark(background-color, #f8f8f8, #2b2b2b);
241   @include lightDark(border-color, #DDD, #444);
242 }
243
244 code {
245   @extend .code-base;
246   display: inline;
247   padding: 1px 3px;
248   white-space:pre-wrap;
249   line-height: 1.2em;
250 }
251
252 span.code {
253   @extend .code-base;
254   padding: 1px $-xs;
255 }
256
257 pre code {
258   background-color: transparent;
259   border: 0;
260   font-size: 1em;
261   display: block;
262   line-height: 1.6;
263 }
264
265 span.highlight {
266   font-weight: bold;
267   padding: 2px 4px;
268 }
269
270 /*
271  * Lists
272  */
273 ul, ol {
274   p {
275     margin: 0;
276   }
277 }
278 ul {
279   padding-left: $-m * 1.3;
280   padding-right: $-m * 1.3;
281   list-style: disc;
282   ul {
283     list-style: circle;
284     margin-top: 0;
285     margin-bottom: 0;
286   }
287   label {
288     margin: 0;
289   }
290 }
291
292 ol {
293   list-style: decimal;
294   padding-left: $-m * 2;
295   padding-right: $-m * 2;
296 }
297
298 li.checkbox-item, li.task-list-item {
299   list-style: none;
300   margin-left: - ($-m * 1.3);
301   input[type="checkbox"] {
302     margin-right: $-xs;
303   }
304 }
305
306 li > ol, li > ul {
307   margin-block-end: 0px;
308   margin-block-start: 0px;
309   padding-block-end: 0px;
310   padding-block-start: 0px;
311 }
312
313 /*
314  * Generic text styling classes
315  */
316 .underlined {
317   text-decoration: underline;
318 }
319
320 .text-center {
321   text-align: center;
322 }
323 .text-left {
324   text-align: start;
325 }
326 .text-right {
327   text-align: end;
328 }
329
330 @each $sizeLetter, $size in $screen-sizes {
331   @include larger-than($size) {
332     .text-#{$sizeLetter}-center {
333       text-align: center;
334     }
335     .text-#{$sizeLetter}-left {
336       text-align: start;
337     }
338     .text-#{$sizeLetter}-right {
339       text-align: end;
340     }
341   }
342 }
343
344 .text-bigger {
345   font-size: 1.1em;
346 }
347
348 .text-large {
349   font-size: 1.6666em;
350 }
351
352 .no-color {
353   color: inherit;
354 }
355
356 .break-text {
357   word-wrap: break-word;
358   overflow-wrap: break-word;
359 }
360
361 .text-limit-lines-1 {
362   white-space: nowrap;
363   overflow: hidden;
364   text-overflow: ellipsis;
365 }
366
367 .text-limit-lines-2 {
368   // -webkit use here is actually standardised cross-browser:
369   // https://developer.mozilla.org/en-US/docs/Web/CSS/-webkit-line-clamp
370   display: -webkit-box;
371   -webkit-box-orient: vertical;
372   -webkit-line-clamp: 2;
373   overflow: hidden;
374 }
375
376 /**
377  * Grouping
378  */
379 .header-group {
380   margin: $-m 0;
381   h1, h2, h3, h4, h5, h6 {
382     margin: 0;
383   }
384 }
385
386 span.sep {
387   color: #BBB;
388   padding: 0 $-xs;
389 }
390
391 .list > * {
392   display: block;
393 }
394
395 /**
396   * Icons
397   */
398 .svg-icon {
399   width: 1em;
400   height: 1em;
401   display: inline-block;
402   position: relative;
403   bottom: -0.105em;
404   margin-inline-end: $-xs;
405   pointer-events: none;
406   fill: currentColor;
407 }
Morty Proxy This is a proxified and sanitized view of the page, visit original site.