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