1
1
@import " variables.less" ;
2
2
3
- /* http://prismjs.com/download.html?themes=prism&languages=markup+clike+javascript+jsx */
4
- /* *
5
- * prism.js default theme for JavaScript, CSS and HTML
6
- * Based on dabblet (http://dabblet.com)
7
- * @author Lea Verou
8
- */
9
-
10
- code [class*= " language-" ],
11
- pre [class*= " language-" ],
12
- .apiIndex pre {
3
+ .prism {
4
+ position : relative ;
5
+
6
+ @media screen and (max-width : 1020px ) {
7
+ padding : 4px 8px ;
8
+ margin-left : -12px ;
9
+ font-size : 11px ;
10
+ }
11
+
12
+ @media print {
13
+ text-shadow : none ;
14
+ }
15
+ }
16
+
17
+ .prism + .prism {
18
+ margin-top : -15px ;
19
+ }
20
+
21
+ .prism {
13
22
.code-font ();
14
23
text-shadow : 0 1px white ;
15
24
direction : ltr ;
@@ -26,45 +35,40 @@ pre[class*="language-"],
26
35
-moz-hyphens : none ;
27
36
-ms-hyphens : none ;
28
37
hyphens : none ;
29
- }
30
38
31
- pre [class*= " language-" ]::-moz-selection , pre [class*= " language-" ] ::-moz-selection ,
32
- code [class*= " language-" ]::-moz-selection , code [class*= " language-" ] ::-moz-selection {
33
- text-shadow : none ;
34
- background : #b3d4fc ;
35
- }
39
+ white-space : pre-wrap ;
36
40
37
- pre [class *= " language- " ] ::selection , pre [class *= " language- " ] ::selection ,
38
- code [class *= " language- " ] ::selection , code [class *= " language- " ] ::selection {
39
- text-shadow : none ;
40
- background : #b3d4fc ;
41
- }
41
+ font-size : 13 px ;
42
+ line-height : 17 px ;
43
+ background : white ;
44
+ box-shadow : inset 0 0 0 1 px #EEE , inset 4 px 0 0 #EEE ;
45
+ border-radius : 3 px ;
42
46
43
- @media print {
44
- code [class*= " language-" ],
45
- pre [class*= " language-" ] {
47
+ .line-highlight {
48
+ background-color : rgba (229 , 53 , 171 , 0.15 );
49
+ left : 0 ;
50
+ line-height : inherit ;
51
+ margin-top : 5px ;
52
+ pointer-events : none ;
53
+ position : absolute ;
54
+ right : 0 ;
55
+ }
56
+
57
+ ::-moz-selection , ::selection {
46
58
text-shadow : none ;
59
+ background : #b3d4fc ;
47
60
}
48
61
}
49
62
50
- /* Code blocks */
51
- pre [class*= " language-" ] {
52
- padding : 1em ;
53
- margin : .5em 0 ;
63
+ // Code blocks
64
+ pre .prism {
65
+ padding : 7px 14px ;
66
+ margin-left : -4px ;
67
+ margin-bottom : 10px ;
54
68
overflow : auto ;
55
69
}
56
70
57
- :not (pre ) > code [class*= " language-" ],
58
- pre [class*= " language-" ] {
59
- background : #f5f2f0 ;
60
- }
61
-
62
- /* Inline code */
63
- :not (pre ) > code [class*= " language-" ] {
64
- padding : .1em ;
65
- border-radius : .3em ;
66
- }
67
-
71
+ // Colors
68
72
.token.comment ,
69
73
.token.prolog ,
70
74
.token.doctype ,
@@ -135,49 +139,3 @@ pre[class*="language-"] {
135
139
.token.entity {
136
140
cursor : help ;
137
141
}
138
-
139
- /* Custom prism rules for the GraphQL docs */
140
-
141
- code [class*= " language-" ],
142
- pre [class*= " language-" ] {
143
- margin-bottom : 10px ;
144
- }
145
- code [class*= " language-" ],
146
- pre [class*= " language-" ],
147
- .apiIndex pre {
148
- .code-font ();
149
- white-space : pre-wrap ;
150
- }
151
-
152
- code [class*= " language-" ],
153
- pre [class*= " language-" ],
154
- .apiIndex li {
155
- font-size : 13px ;
156
- line-height : 17px ;
157
- padding : 7px 14px ;
158
- background : white ;
159
- box-shadow : inset 0 0 0 1px #EEE , inset 4px 0 0 #EEE ;
160
- border-radius : 3px ;
161
- margin-left : -4px ;
162
- }
163
-
164
- .prism + .prism {
165
- margin-top : -15px ;
166
- }
167
-
168
- /* Line highlighting */
169
-
170
- .prism {
171
- position : relative ;
172
- }
173
-
174
- .line-highlight {
175
- background-color : rgba (229 , 53 , 171 , 0.15 );
176
- left : 0 ;
177
- line-height : inherit ;
178
- margin-top : 5px ;
179
- pointer-events : none ;
180
- position : absolute ;
181
- right : 0 ;
182
- }
183
-
0 commit comments