Initial commit

This commit is contained in:
2026-08-20 11:41:17 +00:00
commit 6949695eac
2334 changed files with 646393 additions and 0 deletions
@@ -0,0 +1,34 @@
[
{
"name": "non-important does not override important",
"styles": [
"color:red!important",
"color:blue"
],
"expected": "color:red!important;"
},
{
"name": "later important overrides non-important",
"styles": [
"color:red",
"color:blue!important"
],
"expected": "color:blue!important;"
},
{
"name": "later same-priority declaration wins",
"styles": [
"margin:1px",
"margin:2px"
],
"expected": "margin:2px;"
},
{
"name": "important applies per property",
"styles": [
"color:red!important;margin:1px",
"color:blue;margin:2px"
],
"expected": "color:red!important;margin:2px;"
}
]
@@ -0,0 +1,3 @@
@charset "UTF-8";
h1 { color: red; }
h2 { font-size: 14pt; }
@@ -0,0 +1 @@
h3 { color: green; }
@@ -0,0 +1,3 @@
/* base styles */
h1 { color: red; }
h2 { font-size: 14pt; }
@@ -0,0 +1,2 @@
/* overrides */
h1 { color: blue; }
@@ -0,0 +1,2 @@
@import "base.css";
h3 { margin: 0; }
@@ -0,0 +1,12 @@
a[href^="mailto:"]::after {
content: "mailto:user@example.com;subject=test";
}
div[data-url*="example.com?a=1&b=2"] {
background-image: url("https://example.com/a;b.png?x=1&y=2");
font-family: "Open Sans", "Noto Sans", sans-serif;
}
p.note {
background: linear-gradient(90deg, rgba(0,0,0,.1), rgba(255,255,255,.8));
}
@@ -0,0 +1,3 @@
.icon\:warning[data-kind="print-a"]:first-child { color: red; }
#hero\#title > a.link\+cta[href*="campaign=42"] { margin: 0; }
nav ul li:nth-child(2) > a[title="A > B"] { text-decoration: underline; }
@@ -0,0 +1,74 @@
[
{
"name": "dash-match prefix match",
"selector": " a[id|=promo]",
"node": 2,
"expected": true
},
{
"name": "dash-match exact match",
"selector": " a[id|=promo-link]",
"node": 2,
"expected": true
},
{
"name": "substring match in href",
"selector": " a[href*=\"b=2\"]",
"node": 2,
"expected": true
},
{
"name": "suffix match in href",
"selector": " a[href$=\"b=2\"]",
"node": 2,
"expected": true
},
{
"name": "prefix match in href",
"selector": " a[href^=\"https://ex.com\"]",
"node": 2,
"expected": true
},
{
"name": "includes operator with dashed attribute name",
"selector": " a[data-role~=cta]",
"node": 2,
"expected": true
},
{
"name": "quoted attribute value with space",
"selector": " a[title=\"Hello World\"]",
"node": 2,
"expected": false
},
{
"name": "lang pseudo-class with explicit tag",
"selector": " a:lang(en-US)",
"node": 2,
"expected": true
},
{
"name": "first-child pseudo true",
"selector": " a:first-child",
"node": 2,
"expected": true
},
{
"name": "last-child pseudo false",
"selector": " a:last-child",
"node": 2,
"expected": false
},
{
"name": "empty pseudo true on sibling span",
"selector": " span:empty",
"node": 3,
"expected": true
},
{
"name": "only-child pseudo false on sibling span",
"selector": " span:only-child",
"node": 3,
"expected": false
}
]