]> BookStack Code Mirror - bookstack/blob - resources/assets/sass/_text.scss
Merge branch 'master' into translations
[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 }
179 /*
180  * Text colors
181  */
182 p.pos, p .pos, span.pos, .text-pos {
183   color: $positive;
184   &:hover {
185     color: $positive;
186   }
187 }
188
189 p.neg, p .neg, span.neg, .text-neg {
190   color: $negative;
191   &:hover {
192     color: $negative;
193   }
194 }
195
196 p.muted, p .muted, span.muted, .text-muted {
197         color: lighten($text-dark, 26%);
198     &.small, .small {
199       color: lighten($text-dark, 32%);
200     }
201 }
202
203 p.primary, p .primary, span.primary, .text-primary {
204         color: $primary;
205   &:hover {
206     color: $primary;
207   }
208 }
209
210 p.secondary, p .secondary, span.secondary, .text-secondary {
211         color: $secondary;
212   &:hover {
213     color: $secondary;
214   }
215 }
216
217 .text-book {
218   color: $color-book;
219   &:hover {
220     color: $color-book;
221   }
222 }
223 .text-page {
224   color: $color-page;
225   &:hover {
226     color: $color-page;
227   }
228   &.draft {
229     color: $color-page-draft;
230   }
231   &.draft:hover {
232     color: $color-page-draft;
233   }
234 }
235 .text-chapter {
236   color: $color-chapter;
237   &:hover {
238     color: $color-chapter;
239   }
240 }
241 .faded .text-book:hover {
242   color: $color-book !important;
243 }
244 .faded .text-chapter:hover {
245   color: $color-chapter !important;
246 }
247 .faded .text-page:hover {
248   color: $color-page !important;
249 }
250
251 span.highlight {
252   //background-color: rgba($primary, 0.2);
253   font-weight: bold;
254   padding: 2px 4px;
255 }
256
257 /*
258  * Lists
259  */
260 ul {
261   padding-left: $-m * 1.3;
262   list-style: disc;
263   overflow: hidden;
264 }
265
266 ol {
267   list-style: decimal;
268   padding-left: $-m * 2;
269   overflow: hidden;
270 }
271
272 /*
273  * Generic text styling classes
274  */
275 .underlined {
276   text-decoration: underline;
277 }
278
279 .text-center {
280   text-align: center;
281 }
282
283 .text-left {
284   text-align: left;
285 }
286
287 .text-right {
288   text-align: right;
289 }
290
291 .text-bigger {
292   font-size: 1.1em;
293 }
294
295 .text-large {
296   font-size: 1.6666em;
297 }
298
299 .no-color {
300   color: inherit;
301 }
302
303 /**
304  * Grouping
305  */
306 .header-group {
307   margin: $-m 0;
308   h1, h2, h3, h4, h5, h6 {
309     margin: 0;
310   }
311 }
312
313 span.sep {
314   color: #BBB;
315   padding: 0 $-xs;
316 }
317
318 .list > * {
319   display: block;
320 }
321
322 .action-header {
323   h1 {
324     margin-top: $-m;
325   }
326 }
327
328 /**
329   * Icons
330   */
331 i {
332   padding-right: $-xs;
333 }
334