]> BookStack Code Mirror - bookstack/blob - resources/sass/_text.scss
Update settings.php
[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   color: #222;
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: var(--color-primary);
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 .blended-links a {
116   color: inherit;
117   svg {
118     fill: currentColor;
119   }
120 }
121
122 /*
123  * Other HTML Text Elements
124  */
125 p, ul, ol, pre, table, blockquote {
126   margin-top: 0.3em;
127   margin-bottom: 1.375em;
128 }
129
130 hr {
131   border: 0;
132   height: 1px;
133   background: #EAEAEA;
134   margin-bottom: $-l;
135   &.faded {
136     background-image: linear-gradient(to right, #FFF, #e3e0e0 20%, #e3e0e0 80%, #FFF);
137   }
138   &.margin-top, &.even {
139     margin-top: $-l;
140   }
141 }
142
143 strong, b, .bold, .strong {
144   font-weight: bold;
145   > strong, > b, > .bold, > .strong {
146     font-weight: bolder;
147   }
148 }
149
150 em, i, .italic {
151   font-style: italic;
152 }
153
154 small, p.small, span.small, .text-small {
155   font-size: 0.75rem;
156   color: lighten($text-dark, 10%);
157 }
158
159 sup, .superscript {
160   vertical-align: super;
161   font-size: 0.8em;
162 }
163
164 sub, .subscript {
165   vertical-align: sub;
166   font-size: 0.8em;
167 }
168
169 pre {
170   font-size: 12px;
171   background-color: #f5f5f5;
172   border: 1px solid #DDD;
173   padding-left: 31px;
174   position: relative;
175   padding-top: 3px;
176   padding-bottom: 3px;
177   &:after {
178     content: '';
179     display: block;
180     position: absolute;
181     top: 0;
182     width: 29px;
183     left: 0;
184     background-color: #f5f5f5;
185     height: 100%;
186     border-right: 1px solid #DDD;
187   }
188 }
189
190 @media print {
191   pre {
192     padding-left: 12px;
193   }
194   pre:after {
195     display: none;
196   }
197 }
198
199 blockquote {
200   display: block;
201   position: relative;
202   border-left: 4px solid var(--color-primary);
203   background-color: #F8F8F8;
204   padding: $-s $-m $-s $-xl;
205   &:before {
206     content: "\201C";
207     font-size: 2em;
208     font-weight: bold;
209     position: absolute;
210     top: $-s;
211     left: $-s;
212     color: lighten($text-dark, 20%);
213   }
214 }
215
216 .text-mono {
217   font-family: $mono;
218 }
219
220 .text-uppercase {
221   text-transform: uppercase;
222 }
223
224 .text-capitals {
225   text-transform: capitalize;
226 }
227
228 .code-base {
229     background-color: #F8F8F8;
230     font-size: 0.80em;
231     border: 1px solid #DDD;
232     border-radius: 3px;
233 }
234
235 code {
236   @extend .code-base;
237   display: inline;
238   padding: 1px 3px;
239   white-space:pre-wrap;
240   line-height: 1.2em;
241 }
242
243 span.code {
244   @extend .code-base;
245   padding: 1px $-xs;
246 }
247
248 pre code {
249   background-color: transparent;
250   border: 0;
251   font-size: 1em;
252   display: block;
253   line-height: 1.6;
254 }
255
256 span.highlight {
257   font-weight: bold;
258   padding: 2px 4px;
259 }
260
261 /*
262  * Lists
263  */
264 ul, ol {
265   p {
266     margin: 0;
267   }
268 }
269 ul {
270   padding-left: $-m * 1.3;
271   padding-right: $-m * 1.3;
272   list-style: disc;
273   ul {
274     list-style: circle;
275     margin-top: 0;
276     margin-bottom: 0;
277   }
278   label {
279     margin: 0;
280   }
281 }
282
283 ol {
284   list-style: decimal;
285   padding-left: $-m * 2;
286   padding-right: $-m * 2;
287 }
288
289 li.checkbox-item, li.task-list-item {
290   list-style: none;
291   margin-left: - ($-m * 1.3);
292   input[type="checkbox"] {
293     margin-right: $-xs;
294   }
295 }
296
297 li > ol, li > ul {
298   margin-block-end: 0px;
299   margin-block-start: 0px;
300   padding-block-end: 0px;
301   padding-block-start: 0px;
302 }
303
304 /*
305  * Generic text styling classes
306  */
307 .underlined {
308   text-decoration: underline;
309 }
310
311 .text-center {
312   text-align: center;
313 }
314 .text-left {
315   text-align: start;
316 }
317 .text-right {
318   text-align: end;
319 }
320
321 @each $sizeLetter, $size in $screen-sizes {
322   @include larger-than($size) {
323     .text-#{$sizeLetter}-center {
324       text-align: center;
325     }
326     .text-#{$sizeLetter}-left {
327       text-align: start;
328     }
329     .text-#{$sizeLetter}-right {
330       text-align: end;
331     }
332   }
333 }
334
335 .text-bigger {
336   font-size: 1.1em;
337 }
338
339 .text-large {
340   font-size: 1.6666em;
341 }
342
343 .no-color {
344   color: inherit;
345 }
346
347 .break-text {
348   word-wrap: break-word;
349   overflow-wrap: break-word;
350 }
351
352 .limit-text {
353   white-space: nowrap;
354   overflow: hidden;
355   text-overflow: ellipsis;
356 }
357
358 /**
359  * Grouping
360  */
361 .header-group {
362   margin: $-m 0;
363   h1, h2, h3, h4, h5, h6 {
364     margin: 0;
365   }
366 }
367
368 span.sep {
369   color: #BBB;
370   padding: 0 $-xs;
371 }
372
373 .list > * {
374   display: block;
375 }
376
377 /**
378   * Icons
379   */
380 .svg-icon {
381   width: 1em;
382   height: 1em;
383   display: inline-block;
384   position: relative;
385   bottom: -0.105em;
386   margin-inline-end: $-xs;
387   pointer-events: none;
388 }