]> BookStack Code Mirror - bookstack/blob - resources/assets/sass/_text.scss
fix markdown editor resizing with long strings
[bookstack] / resources / assets / 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: #555;
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   font-weight: 500;
59   line-height: 1.2em;
60   margin-top: 0.78571429em;
61   margin-bottom: 0.66em;
62 }
63
64 /*
65  * Link styling
66  */
67 a, .link {
68   color: $primary;
69   cursor: pointer;
70   text-decoration: none;
71   transition: color ease-in-out 80ms;
72   line-height: 1.6;
73   &:hover {
74     text-decoration: underline;
75     color: darken($primary, 20%);
76   }
77   &.icon {
78     display: inline-block;
79   }
80   svg {
81     position: relative;
82     display: inline-block;
83   }
84 }
85
86 /*
87  * Other HTML Text Elements
88  */
89 p, ul, ol, pre, table, blockquote {
90   margin-top: 0.3em;
91   margin-bottom: 1.375em;
92 }
93
94 hr {
95   border: 0;
96   height: 1px;
97   background: #EAEAEA;
98   margin-bottom: $-l;
99   &.faded {
100     background-image: linear-gradient(to right, #FFF, #e3e0e0 20%, #e3e0e0 80%, #FFF);
101   }
102   &.margin-top, &.even {
103     margin-top: $-l;
104   }
105 }
106
107 strong, b, .bold, .strong {
108   font-weight: bold;
109   > strong, > b, > .bold, > .strong {
110     font-weight: bolder;
111   }
112 }
113
114 em, i, .italic {
115   font-style: italic;
116 }
117
118 small, p.small, span.small, .text-small {
119   font-size: 0.8em;
120   color: lighten($text-dark, 20%);
121   small, p.small, span.small, .text-small {
122     font-size: 1em;
123   }
124 }
125
126 sup, .superscript {
127   vertical-align: super;
128   font-size: 0.8em;
129 }
130
131 sub, .subscript {
132   vertical-align: sub;
133   font-size: 0.8em;
134 }
135
136 pre {
137   font-size: 12px;
138   background-color: #f5f5f5;
139   border: 1px solid #DDD;
140   padding-left: 31px;
141   position: relative;
142   padding-top: 3px;
143   padding-bottom: 3px;
144   &:after {
145     content: '';
146     display: block;
147     position: absolute;
148     top: 0;
149     width: 29px;
150     left: 0;
151     background-color: #f5f5f5;
152     height: 100%;
153     border-right: 1px solid #DDD;
154   }
155 }
156
157 @media print {
158   pre {
159     padding-left: 12px;
160   }
161   pre:after {
162     display: none;
163   }
164 }
165
166 blockquote {
167   display: block;
168   position: relative;
169   border-left: 4px solid $primary;
170   background-color: #F8F8F8;
171   padding: $-s $-m $-s $-xl;
172   &:before {
173     content: "\201C";
174     font-size: 2em;
175     font-weight: bold;
176     position: absolute;
177     top: $-s;
178     left: $-s;
179     color: lighten($text-dark, 20%);
180   }
181 }
182
183 .code-base {
184     background-color: #F8F8F8;
185     font-size: 0.80em;
186     border: 1px solid #DDD;
187     border-radius: 3px;
188 }
189
190 code {
191   @extend .code-base;
192   display: inline;
193   padding: 1px 3px;
194   white-space:pre;
195   line-height: 1.2em;
196   margin-bottom: 1.2em;
197 }
198
199 span.code {
200   @extend .code-base;
201   padding: 1px $-xs;
202 }
203
204 pre code {
205   background-color: transparent;
206   border: 0;
207   font-size: 1em;
208   display: block;
209   line-height: 1.6;
210 }
211 /*
212  * Text colors
213  */
214 p.pos, p .pos, span.pos, .text-pos {
215   color: $positive;
216   fill: $positive;
217   &:hover {
218     color: $positive;
219     fill: $positive;
220   }
221 }
222
223 p.neg, p .neg, span.neg, .text-neg {
224   color: $negative;
225   fill: $negative;
226   &:hover {
227     color: $negative;
228     fill: $negative;
229   }
230 }
231
232 p.muted, p .muted, span.muted, .text-muted {
233         color: lighten($text-dark, 26%);
234         fill: lighten($text-dark, 26%);
235     &.small, .small {
236       color: lighten($text-dark, 32%);
237       fill: lighten($text-dark, 32%);
238     }
239 }
240
241 p.primary, p .primary, span.primary, .text-primary {
242         color: $primary;
243         fill: $primary;
244   &:hover {
245     color: $primary;
246     fill: $primary;
247   }
248 }
249
250 p.secondary, p .secondary, span.secondary, .text-secondary {
251         color: $secondary;
252         fill: $secondary;
253   &:hover {
254     color: $secondary;
255     fill: $secondary;
256   }
257 }
258
259 .text-book {
260   color: $color-book;
261   fill: $color-book;
262   &:hover {
263     color: $color-book;
264     fill: $color-book;
265   }
266 }
267 .text-page {
268   color: $color-page;
269   fill: $color-page;
270   &:hover {
271     color: $color-page;
272     fill: $color-page;
273   }
274   &.draft {
275     color: $color-page-draft;
276     fill: $color-page-draft;
277   }
278   &.draft:hover {
279     color: $color-page-draft;
280     fill: $color-page-draft;
281   }
282 }
283 .text-chapter {
284   color: $color-chapter;
285   fill: $color-chapter;
286   &:hover {
287     color: $color-chapter;
288     fill: $color-chapter;
289   }
290 }
291 .faded .text-book:hover {
292   color: $color-book !important;
293   fill: $color-book !important;
294 }
295 .faded .text-chapter:hover {
296   color: $color-chapter !important;
297   fill: $color-chapter !important;
298 }
299 .faded .text-page:hover {
300   color: $color-page !important;
301   fill: $color-page !important;
302 }
303
304 span.highlight {
305   //background-color: rgba($primary, 0.2);
306   font-weight: bold;
307   padding: 2px 4px;
308 }
309
310 /*
311  * Lists
312  */
313 ul, ol {
314   overflow: hidden;
315   p {
316     margin: 0;
317   }
318 }
319 ul {
320   padding-left: $-m * 1.3;
321   list-style: disc;
322   ul {
323     list-style: circle;
324     margin-top: 0;
325     margin-bottom: 0;
326   }
327   label {
328     margin: 0;
329   }
330 }
331
332 ol {
333   list-style: decimal;
334   padding-left: $-m * 2;
335 }
336
337 li.checkbox-item, li.task-list-item {
338   list-style: none;
339   margin-left: - ($-m * 1.3);
340   input[type="checkbox"] {
341     margin-right: $-xs;
342   }
343 }
344
345 /*
346  * Generic text styling classes
347  */
348 .underlined {
349   text-decoration: underline;
350 }
351
352 .text-center {
353   text-align: center;
354 }
355
356 .text-left {
357   text-align: left;
358 }
359
360 .text-right {
361   text-align: right;
362 }
363
364 .text-bigger {
365   font-size: 1.1em;
366 }
367
368 .text-large {
369   font-size: 1.6666em;
370 }
371
372 .no-color {
373   color: inherit;
374 }
375
376 .break-text {
377   white-space: pre-wrap;
378   word-wrap: break-word;
379 }
380
381 /**
382  * Grouping
383  */
384 .header-group {
385   margin: $-m 0;
386   h1, h2, h3, h4, h5, h6 {
387     margin: 0;
388   }
389 }
390
391 span.sep {
392   color: #BBB;
393   padding: 0 $-xs;
394 }
395
396 .list > * {
397   display: block;
398 }
399
400 /**
401   * Icons
402   */
403 i {
404   padding-right: $-xs;
405 }
406
407 .svg-icon {
408   width: 1em;
409   display: inline-block;
410   position: relative;
411   bottom: -0.105em;
412   margin-right: $-xs;
413 }
414
Morty Proxy This is a proxified and sanitized view of the page, visit original site.