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