Skip to content

Commit

Permalink
Merge pull request #222 from LeaVerou/css2
Browse files Browse the repository at this point in the history
Added CSS 2 including new filtering
  • Loading branch information
SebastianZ authored Jan 15, 2022
2 parents c4f2908 + 90dc17a commit fb99787
Show file tree
Hide file tree
Showing 3 changed files with 968 additions and 43 deletions.
4 changes: 3 additions & 1 deletion csstest.js
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ function runTests(filter = '') {
var specs = [];
var timeBefore = +new Date;

var removedWords = / *(?:\([^)]*\)|:.*|\b(?:CSS|Module)\b)( *)/g;
var removedWords = / *(?:\([^)]*\)|:.*|\b(?:CSS(?! 2)|Module)\b)( *)/g;

for (var spec in Specs) {
// Filter list of specifications
Expand All @@ -433,6 +433,8 @@ function runTests(filter = '') {
) {
continue;
}
} else if (filter === '' && Specs[spec].status && Specs[spec].status['first-snapshot'] === 1998) {
continue;
}

specs.push({
Expand Down
4 changes: 3 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,12 @@ <h2>Determined by passing <strong id="passedTests"></strong> tests out of <stron
<h1>Filter:</h1>
<form>
<select id="filter">
<option value="" title="All specifications including experimental ones">All</option>
<option value="" title="All specifications including experimental ones but without CSS 2.2">All except CSS 2.2</option>
<option value="all" title="All specifications including experimental ones">All</option>
<option value="stable" title="All specifications listed in the latest CSS snapshot, their predecessors and others that won't change much anymore">Stable</option>
<option value="experimental" title="All specifications not listed in the latest CSS snapshot">Experimental</option>
<optgroup label="CSS snapshots">
<option value="1998" title="Everything included in CSS 2.2">CSS 2.2</option>
<option value="2007" title="All specifications marked as official part of the CSS 2007 snapshot">CSS 2007</option>
<option value="2010" title="All specifications marked as official part of the CSS 2010 snapshot">CSS 2010</option>
<option value="2015" title="All specifications marked as official part of the CSS 2015 snapshot">CSS 2015</option>
Expand Down
Loading

0 comments on commit fb99787

Please sign in to comment.