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