]> BookStack Code Mirror - bookstack/blob - resources/sass/_text.scss
Add git to the apt-get install packages.
[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 .code-base {
217     background-color: #F8F8F8;
218     font-size: 0.80em;
219     border: 1px solid #DDD;
220     border-radius: 3px;
221 }
222
223 code {
224   @extend .code-base;
225   display: inline;
226   padding: 1px 3px;
227   white-space:pre;
228   line-height: 1.2em;
229   margin-bottom: 1.2em;
230 }
231
232 span.code {
233   @extend .code-base;
234   padding: 1px $-xs;
235 }
236
237 pre code {
238   background-color: transparent;
239   border: 0;
240   font-size: 1em;
241   display: block;
242   line-height: 1.6;
243 }
244
245 span.highlight {
246   font-weight: bold;
247   padding: 2px 4px;
248 }
249
250 /*
251  * Lists
252  */
253 ul, ol {
254   overflow: hidden;
255   p {
256     margin: 0;
257   }
258 }
259 ul {
260   padding-left: $-m * 1.3;
261   padding-right: $-m * 1.3;
262   list-style: disc;
263   ul {
264     list-style: circle;
265     margin-top: 0;
266     margin-bottom: 0;
267   }
268   label {
269     margin: 0;
270   }
271 }
272
273 ol {
274   list-style: decimal;
275   padding-left: $-m * 2;
276   padding-right: $-m * 2;
277 }
278
279 li.checkbox-item, li.task-list-item {
280   list-style: none;
281   margin-left: - ($-m * 1.3);
282   input[type="checkbox"] {
283     margin-right: $-xs;
284   }
285 }
286
287 /*
288  * Generic text styling classes
289  */
290 .underlined {
291   text-decoration: underline;
292 }
293
294 .text-center {
295   text-align: center;
296 }
297 .text-left {
298   text-align: left;
299 }
300 .text-right {
301   text-align: right;
302 }
303
304 @each $sizeLetter, $size in $screen-sizes {
305   @include larger-than($size) {
306     .text-#{$sizeLetter}-center {
307       text-align: center;
308     }
309     .text-#{$sizeLetter}-left {
310       text-align: left;
311     }
312     .text-#{$sizeLetter}-right {
313       text-align: right;
314     }
315   }
316 }
317
318 .text-bigger {
319   font-size: 1.1em;
320 }
321
322 .text-large {
323   font-size: 1.6666em;
324 }
325
326 .no-color {
327   color: inherit;
328 }
329
330 .break-text {
331   word-wrap: break-word;
332   overflow-wrap: break-word;
333 }
334
335 .limit-text {
336   white-space: nowrap;
337   overflow: hidden;
338   text-overflow: ellipsis;
339 }
340
341 /**
342  * Grouping
343  */
344 .header-group {
345   margin: $-m 0;
346   h1, h2, h3, h4, h5, h6 {
347     margin: 0;
348   }
349 }
350
351 span.sep {
352   color: #BBB;
353   padding: 0 $-xs;
354 }
355
356 .list > * {
357   display: block;
358 }
359
360 /**
361   * Icons
362   */
363 .svg-icon {
364   width: 1em;
365   height: 1em;
366   display: inline-block;
367   position: relative;
368   bottom: -0.105em;
369   margin-right: $-xs;
370   pointer-events: none;
371 }
372
Morty Proxy This is a proxified and sanitized view of the page, visit original site.