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