-
Notifications
You must be signed in to change notification settings - Fork 46
Expand file tree
/
Copy pathapp-markdownSyntax.css
More file actions
77 lines (74 loc) · 2.45 KB
/
app-markdownSyntax.css
File metadata and controls
77 lines (74 loc) · 2.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
@charset "utf-8";
/* MARKDOWN SYNTAX HIGHLIGHTING --------------------------------------------- */
/* Instead of color highlighting, we use typography (alternative font, font size),
and color contrast (dimmed gray) to highlight Markdown’s syntax markers.
Alternatively — or rather as an addition, we might implement colorization, too:
cfr “Color-coded token highlighting”, below. */
.cm-formatting {
background-color: transparent !important;
display:inline-block;
vertical-align:text-top;
}
.cm-formatting-header,
.cm-formatting-em,
.cm-formatting-strong,
.cm-formatting-code,
.cm-formatting-code-block,
.cm-formatting-link,
.cm-formatting-link-string,
.cm-formatting-link-string + .cm-string,
/*.cm-formatting-link + .cm-link + .cm-formatting-link + .cm-link,*/
.cm-tag,
.cm-formatting-quote,
.cm-formatting-quote-1,
/*.cm-formatting-list,
.cm-formatting-list-ol,
.cm-formatting-list-ul,*/
.cm-hr {
color:rgb(67,67,67) !important;
opacity: 0.2;
font-family: Cousine, Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace;
font-style:normal !important;
font-weight:normal !important;
font-size: 0.8rem;
}
.cm-tag,
.cm-formatting-link-string + .cm-string { opacity: 0.5; }
/* Hang syntax markers of block-level elements into the margin */
/* To do:
- fix regex for headings (in CodeMirror submodule, markdown.js): `atxHeaderRE = /^#+\s/`
- fix headings’ index (ibidem): `state.header = match[0].length <= 6 ? match[0].length-1 : 6;`
*/
@media (min-width: 800px) {
.cm-formatting-header,
.cm-formatting-quote,
.cm-formatting-list,
.cm-hr:before {
color:inherit;
position: absolute;
bottom:top;
left:-5rem;
width:4.5rem;
text-align: right;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
-ms-box-sizing: border-box;
-o-box-sizing: border-box;
box-sizing: border-box;
}
}
.cm-formatting-list-ul { visibility: hidden; }
.cm-formatting-list-ul:before { content:"–"; visibility: visible; }
/* To do:
- fix regex for ordered lists (in CodeMirror submodule, markdown.js): `olRE = /^([0-9]+\.|[A-z]+\))\s+/`
*/
.cm-formatting-code-block { visibility: hidden; }
.cm-formatting-code-block:before { content:"┄"; visibility: visible; }
.cm-hr {
display: block;
border-bottom: solid 1px rgb(150,150,150);
color: transparent !important;
}.cm-hr:before {
content:"⁂"; /* U+2042 'ASTERISM' */
color: rgb(67,67,67) !important;
}