]> BookStack Code Mirror - bookstack/blob - resources/assets/sass/_text.scss
Trying to make the tests green.
[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
156 blockquote {
157   display: block;
158   position: relative;
159   border-left: 4px solid $primary;
160   background-color: #F8F8F8;
161   padding: $-s $-m $-s $-xl;
162   &:before {
163     content: "\201C";
164     font-size: 2em;
165     font-weight: bold;
166     position: absolute;
167     top: $-s;
168     left: $-s;
169     color: lighten($text-dark, 20%);
170   }
171 }
172
173 .code-base {
174     background-color: #F8F8F8;
175     font-family: monospace;
176     font-size: 0.80em;
177     border: 1px solid #DDD;
178     border-radius: 3px;
179 }
180
181 code {
182   @extend .code-base;
183   display: inline;
184   padding: 1px 3px;
185   white-space:pre;
186   line-height: 1.2em;
187   margin-bottom: 1.2em;
188 }
189
190 span.code {
191   @extend .code-base;
192   padding: 1px $-xs;
193 }
194
195 pre code {
196   background-color: transparent;
197   border: 0;
198   font-size: 1em;
199   display: block;
200   line-height: 1.6;
201 }
202 /*
203  * Text colors
204  */
205 p.pos, p .pos, span.pos, .text-pos {
206   color: $positive;
207   &:hover {
208     color: $positive;
209   }
210 }
211
212 p.neg, p .neg, span.neg, .text-neg {
213   color: $negative;
214   &:hover {
215     color: $negative;
216   }
217 }
218
219 p.muted, p .muted, span.muted, .text-muted {
220         color: lighten($text-dark, 26%);
221     &.small, .small {
222       color: lighten($text-dark, 32%);
223     }
224 }
225
226 p.primary, p .primary, span.primary, .text-primary {
227         color: $primary;
228   &:hover {
229     color: $primary;
230   }
231 }
232
233 p.secondary, p .secondary, span.secondary, .text-secondary {
234         color: $secondary;
235   &:hover {
236     color: $secondary;
237   }
238 }
239
240 .text-book {
241   color: $color-book;
242   &:hover {
243     color: $color-book;
244   }
245 }
246 .text-page {
247   color: $color-page;
248   &:hover {
249     color: $color-page;
250   }
251   &.draft {
252     color: $color-page-draft;
253   }
254   &.draft:hover {
255     color: $color-page-draft;
256   }
257 }
258 .text-chapter {
259   color: $color-chapter;
260   &:hover {
261     color: $color-chapter;
262   }
263 }
264 .faded .text-book:hover {
265   color: $color-book !important;
266 }
267 .faded .text-chapter:hover {
268   color: $color-chapter !important;
269 }
270 .faded .text-page:hover {
271   color: $color-page !important;
272 }
273
274 span.highlight {
275   //background-color: rgba($primary, 0.2);
276   font-weight: bold;
277   padding: 2px 4px;
278 }
279
280 /*
281  * Lists
282  */
283 ul, ol {
284   overflow: hidden;
285   p {
286     margin: 0;
287   }
288 }
289 ul {
290   padding-left: $-m * 1.3;
291   list-style: disc;
292   ul {
293     list-style: circle;
294     margin-top: 0;
295     margin-bottom: 0;
296   }
297   label {
298     margin: 0;
299   }
300 }
301
302 ol {
303   list-style: decimal;
304   padding-left: $-m * 2;
305 }
306
307 li.checkbox-item, li.task-list-item {
308   list-style: none;
309   margin-left: - ($-m * 1.3);
310   input[type="checkbox"] {
311     margin-right: $-xs;
312   }
313 }
314
315 /*
316  * Generic text styling classes
317  */
318 .underlined {
319   text-decoration: underline;
320 }
321
322 .text-center {
323   text-align: center;
324 }
325
326 .text-left {
327   text-align: left;
328 }
329
330 .text-right {
331   text-align: right;
332 }
333
334 .text-bigger {
335   font-size: 1.1em;
336 }
337
338 .text-large {
339   font-size: 1.6666em;
340 }
341
342 .no-color {
343   color: inherit;
344 }
345
346 /**
347  * Grouping
348  */
349 .header-group {
350   margin: $-m 0;
351   h1, h2, h3, h4, h5, h6 {
352     margin: 0;
353   }
354 }
355
356 span.sep {
357   color: #BBB;
358   padding: 0 $-xs;
359 }
360
361 .list > * {
362   display: block;
363 }
364
365 .action-header {
366   h1 {
367     margin-top: $-m;
368   }
369 }
370
371 /**
372   * Icons
373   */
374 i {
375   padding-right: $-xs;
376 }
377