Skip to content

Commit ca0cb4e

Browse files
Merge branch 'master' into html-test
2 parents 1012fed + ae8888a commit ca0cb4e

136 files changed

Lines changed: 2168 additions & 558 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.eslintrc.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,13 @@ module.exports = {
7575
'regexp/no-trivially-nested-assertion': 'warn',
7676
'regexp/no-trivially-nested-quantifier': 'warn',
7777
'regexp/no-useless-character-class': 'warn',
78+
'regexp/no-useless-flag': 'warn',
7879
'regexp/no-useless-lazy': 'warn',
80+
'regexp/no-useless-range': 'warn',
81+
'regexp/prefer-d': ['warn', { insideCharacterClass: 'ignore' }],
82+
'regexp/prefer-plus-quantifier': 'warn',
83+
'regexp/prefer-question-quantifier': 'warn',
84+
'regexp/prefer-star-quantifier': 'warn',
7985
'regexp/prefer-w': 'warn',
8086
'regexp/sort-alternatives': 'warn',
8187
'regexp/sort-flags': 'warn',

assets/code.js

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -244,27 +244,4 @@ var setTheme;
244244

245245
$$('.plugin-list').forEach(listPlugins);
246246

247-
// small polyfill for Element#matches
248-
if (!Element.prototype.matches) {
249-
Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;
250-
}
251-
252-
Prism && Prism.hooks.add('complete', function (env) {
253-
var element = env.element;
254-
255-
requestAnimationFrame(function () {
256-
if (!element.matches('div.code-toolbar > pre > code')) {
257-
return;
258-
}
259-
260-
var pre = element.parentElement;
261-
var wrapper = pre.parentElement;
262-
263-
// transfer margin of pre to wrapper
264-
wrapper.style.margin = window.getComputedStyle(pre).margin;
265-
pre.style.margin = '0';
266-
267-
});
268-
});
269-
270247
}());

assets/style.css

Lines changed: 89 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,6 @@ footer:before {
188188
}
189189

190190
#features {
191-
width: 66em;
192191
margin-top: 2em;
193192
font-size: 80%;
194193
}
@@ -197,12 +196,16 @@ footer:before {
197196
margin: 0 0 2em 0;
198197
list-style: none;
199198
display: inline-block;
200-
width: 27em;
199+
width: 49%;
200+
box-sizing: border-box;
201201
vertical-align: top;
202202
}
203203

204204
#features li:nth-child(odd) {
205-
margin-right: 5em;
205+
padding-right: 2.5em;
206+
}
207+
#features li:nth-child(even) {
208+
padding-left: 2.5em;
206209
}
207210

208211
#features li:before {
@@ -229,7 +232,7 @@ footer:before {
229232
position: relative;
230233
z-index: 1;
231234
float: right;
232-
margin-right: -1em;
235+
margin-right: -9em;
233236
text-align: center;
234237
text-transform: uppercase;
235238
letter-spacing: .2em;
@@ -277,13 +280,89 @@ footer:before {
277280

278281
#theme > input {
279282
position: absolute;
283+
left: 0;
280284
clip: rect(0,0,0,0);
281285
}
282286

283287
#theme > input:checked + label {
284288
background: #7fab14;
285289
}
286290

291+
@media (max-width: 1300px) and (min-width: 1051px) {
292+
#theme {
293+
position: relative;
294+
z-index: 1;
295+
float: left;
296+
margin: 1em 0;
297+
width: 100%;
298+
}
299+
#theme + * {
300+
clear: both;
301+
}
302+
303+
#theme > p {
304+
margin-top: .5em;
305+
}
306+
307+
#theme > label {
308+
float: left;
309+
font-size: 82.6%;
310+
}
311+
312+
#theme > label:before {
313+
display: none;
314+
}
315+
316+
#theme > label:nth-of-type(n+2) {
317+
margin-top: 0;
318+
}
319+
}
320+
321+
@media (max-width: 1050px) {
322+
#theme {
323+
position: relative;
324+
z-index: 1;
325+
float: left;
326+
margin: 1em 0;
327+
}
328+
#theme + * {
329+
clear: both;
330+
}
331+
332+
#theme > p {
333+
left: inherit;
334+
right: -1em;
335+
}
336+
337+
#theme > label {
338+
float: left;
339+
}
340+
341+
#theme > label:before {
342+
display: none;
343+
}
344+
345+
#theme > label:nth-of-type(n+2) {
346+
margin-top: 0;
347+
}
348+
#theme > label:nth-of-type(n+5) {
349+
margin-top: -2.5em;
350+
}
351+
#theme > label:nth-of-type(4n+1) {
352+
margin-left: 12.5em;
353+
}
354+
}
355+
356+
@media (max-width: 800px) {
357+
#theme > label:nth-of-type(4) {
358+
margin-right: 4em;
359+
}
360+
#theme > label:nth-of-type(4n+1) {
361+
margin-left: 4em;
362+
}
363+
}
364+
365+
287366
footer {
288367
margin-top: 2em;
289368
background-position: bottom;
@@ -364,6 +443,12 @@ footer {
364443

365444
#toc li {
366445
list-style: none;
446+
line-height: 1.2;
447+
padding: .2em 0;
448+
}
449+
450+
#toc li a {
451+
padding: .2em 0;
367452
}
368453

369454
#logo:before {
@@ -429,12 +514,3 @@ ul.plugin-list {
429514
ul.plugin-list > li > div {
430515
margin-bottom: .5em;
431516
}
432-
433-
/*
434-
* Fix for Toolbar's overflow issue
435-
*/
436-
437-
div.code-toolbar {
438-
display: block;
439-
overflow: auto;
440-
}

assets/templates/header-main.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ <h1><a href="index.html"><img src="assets/logo.svg" alt="Prism" /></a></h1>
44

55
<p>
66
Prism is a lightweight, extensible syntax highlighter, built with modern web standards in mind.
7-
It’s used in millions of websites, including some of those you visit daily.
7+
It’s used in millions of websites, including some of those you visit daily.
88
</p>
99

1010
<!--<a href="https://twitter.com/share" class="twitter-share-button" data-via="prismjs" data-size="large" data-related="LeaVerou">Tweet</a>

assets/templates/header-plugins.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ <h1><a href="index.html"><img src="assets/logo.svg" alt="Prism" /> plugins</a></
44

55
<p>
66
Prism is a lightweight, extensible syntax highlighter, built with modern web standards in mind.
7-
It’s used in thousands of websites, including some of those you visit daily.
7+
It’s used in millions of websites, including some of those you visit daily.
88
</p>

components.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

components.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1424,6 +1424,11 @@
14241424
"title": "WebAssembly",
14251425
"owner": "Golmote"
14261426
},
1427+
"web-idl": {
1428+
"title": "Web IDL",
1429+
"alias": "webidl",
1430+
"owner": "RunDevelopment"
1431+
},
14271432
"wiki": {
14281433
"title": "Wiki markup",
14291434
"require": "markup",

components/prism-abap.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)