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