summaryrefslogtreecommitdiff
path: root/themes/terminal/assets/css/syntax.css
blob: 215aa82729cac4e2caf750a02c249ab0716e555b (plain)
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
code.language-css,
code.language-scss,
.token.boolean,
.token.string,
.token.entity,
.token.url,
.language-css .token.string,
.language-scss .token.string,
.style .token.string,
.token.attr-value,
.token.keyword,
.token.control,
.token.directive,
.token.statement,
.token.regex,
.token.atrule,
.token.number,
.token.inserted,
.token.important {
  color: var(--accent) !important;
}

.token.tag-id,
.token.atrule-id,
.token.operator,
.token.unit,
.token.placeholder,
.token.variable,
.token.tag,
.token.attr-name,
.token.namespace,
.token.deleted,
.token.property,
.token.class-name,
.token.constant,
.token.symbol {
  color: color-mod(var(--accent) a(70%)) !important;
}

.token.property,
.token.function,
.token.function-name,
.token.deleted,
code.language-javascript,
code.language-html,
.command-line-prompt > span:before {
  color: color-mod(var(--accent) blend(#999 90%)) !important;
}

.token.selector,
.token.tag,
.token.punctuation {
  color: white;
}

.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
  color: rgba(255, 255, 255, .3) !important;
}

.token.namespace {
  opacity: .7 !important;
}

pre[data-line] {
  position: relative;
}

pre[class*="language-"] {
  margin: 0;
  padding: 0;
  overflow: auto;
}

.line-highlight {
  position: absolute;
  left: 0;
  right: 0;
  padding: 0;
  margin: 0;
  background: color-mod(var(--accent) blend(#999 90%) a(8%));
  pointer-events: none;
  line-height: inherit;
  white-space: pre;
}

.line-highlight:before,
.line-highlight[data-end]:after {
  content: attr(data-start);
  position: absolute;
  /* top: .4em; */
  left: .6em;
  min-width: 1em;
  padding: 0 .5em;
  background-color: hsla(24, 20%, 50%, .4);
  color: hsl(24, 20%, 95%);
  font: bold 65%/1.5 sans-serif;
  text-align: center;
  vertical-align: .3em;
  border-radius: 999px;
  text-shadow: none;
  box-shadow: 0 1px white;
}

.line-highlight[data-end]:after {
  content: attr(data-end);
  top: auto;
  bottom: .4em;
}

.line-numbers .line-highlight:before,
.line-numbers .line-highlight:after {
  content: none;
}

:root {
	--code-margin: 40px;
}

.code-toolbar {
	position: relative;
	margin: var(--code-margin) 0;
	padding: 20px;
	border: 1px solid rgba(255, 255, 255, .1);

	+ .code-toolbar,
	+ .highlight,
	+ .highlight .code-toolbar {
		border-top: 0;
		margin-top: calc(-1 * var(--code-margin));
	}

	pre, code {
		border: none;
	}

	code {
		display: block;
		color: inherit;
	}

  > .toolbar {
    button {
      font-size: .8em !important;
      background: hsla(0,0%,87.8%,.2) !important;
      color: #bbb !important;
      box-shadow: 0 2px 0 0 rgba(0,0,0,.2) !important;
      border-radius: 0 !important;
      margin: 6px !important;
      padding: 10px !important;
      user-select:none
    }
  }
}