swc/crates/swc_css_minifier/tests/fixture/compress-selector/input.css
2022-02-25 02:05:12 +00:00

168 lines
4.7 KiB
CSS

a[color="blue"] {color:blue}
a[color=""]{color:blue}
a[color="-"]{color:blue}
a[color="."] {color:blue}
a[color=" "]{color:blue}
a[color=" a "]{color:blue}
a[color=" a"]{color:blue}
a[color="a "]{color:blue}
a[color="\22"]{color:blue}
a[color="B\26 W\3F "]{color:blue}
a[color="\47"]{color:blue}
a[color="😂"]{color:blue}
a[color="👩‍🦼"]{color:blue}
a[color="1"]{color:blue}
a[color="--"]{color:blue}
a[color="-1"]{color:blue}
a[color="-404"]{color:blue}
a[color="-x"]{color:blue}
a[ color= "blue" ] {color:blue}
a[color="blue" i ] {color:blue}
a[class="woop \
woop woop"] {color:blue}
a[class="woop_woop_woop"]{color:blue}
h1[class=" *.js "] + *.js{color:blue}
h1::before {color:blue}
h1::BEfoRE {color:blue}
h1::after {color:blue}
h1::first-letter {color:blue}
h1::first-line {color:blue}
* {color:blue}
*[hreflang|=en]{color:blue}
*.warning{color:blue}
*#myid{color:blue}
*::before{content:"test";color:blue}
*:hover{}
*.class[hreflang|=en]{color:blue}
foo|*[hreflang|=en]{color:blue}
*|*[hreflang|=en]{color:blue}
div {& *[hreflang|=en]{color:blue}}
div {&*[hreflang|=en]{color:blue}}
div {&div {color:blue}}
div {&* {color:blue}}
div {& {color:blue}}
div {&*.class {color:blue}}
/* For example, the following selector matches any element that is being hovered or focused, regardless of its namespace. In particular, it is not limited to only matching elements in the default namespace that are being hovered or focused. */
*|*:is(:hover, :focus) {color:blue}
/* The following selector, however, represents only hovered or focused elements that are in the default namespace, because it uses an explicit universal selector within the :is() notation: */
*|*:is(*:hover, *:focus) {color: blue}
*|*:has(*:not(h1, h2, h3, h4, h5, h6)) {color: blue}
div *:first-child{color:blue}
legend + * {color:blue}
* + legend {color:blue}
* + * {color:blue}
p:nth-child(1){color:blue}
p:NTH-CHILD(1){color:blue}
p:nth-child(2n + 1){color:blue}
p:nth-child(2N + 1){color:blue}
p:nth-child(even){color:blue}
p:nth-child(EVEN){color:blue}
p:nth-child(2n){color:blue}
p:nth-child(1){color: blue}
p:nth-child(0n+1){color: blue}
p:nth-child(-0n+1){color: blue}
p:nth-child(+0n+1) {color:blue}
p:nth-child(0n+5){color: blue}
p:nth-child(0n-5){color: blue}
p:nth-child(+0n-5){color: blue}
p:nth-child(-0n-5){color: blue}
p:nth-child(-1n+3) {color: blue}
p:nth-child(+1n+3) {color: blue}
p:nth-child(1n+3) {color: blue}
p:nth-child(n+3) {color: blue}
p:nth-child(-n+3) {color: blue}
p:nth-child(+n+3) {color: blue}
p:nth-child(+n-3) {color: blue}
p:nth-child(0n-3) {color: blue}
p:nth-child(-0n-3) {color: blue}
p:nth-child(+0n-3) {color: blue}
p:nth-child(n+0) {color: blue}
p:nth-child(+n+0) {color: blue}
p:nth-child(-n+0) {color: blue}
p:nth-child(5n+0) {color: blue}
p:nth-child(-5n+0) {color: blue}
p:nth-child(+5n+0) {color: blue}
p:nth-child(-2n+1) {color:blue}
p:nth-child(n - 0){color:blue}
p:nth-child(n + 0){color:blue}
p:nth-child(-n + 0){color:blue}
p:nth-child(+n + 0){color:blue}
p:nth-of-type(2n+1) {color:blue}
p:nth-last-col(2n+1) {color:blue}
p:nth-col(2n+1) {color:blue}
p:nth-child(1n - 2){color:blue}
p:nth-child(1n + 2){color:blue}
p:nth-child(-1n + 2){color:blue}
p:nth-child(1n){color:blue}
p:nth-child(-1n){color:blue}
p:nth-child(+1n){color:blue}
p:nth-child(0n+5){color:blue}
p:nth-child(1n+0){color:blue}
p:nth-child(n+0){color:blue}
p:nth-child(-n+ 6){color:blue}
p:nth-child(2n-1){color:blue}
p:nth-child(2n+5){color:blue}
p:nth-child(2n+4){color:blue}
p:nth-child(2n+3){color:blue}
p:nth-child(2n+2){color:blue}
p:nth-child(2n+1){color:blue}
p:nth-child(2n-1){color:blue}
p:nth-child(2n-2){color:blue}
p:nth-child(2n-3){color:blue}
p:nth-child(2n-4){color:blue}
p:nth-child(2n-5){color:blue}
p:nth-child(2n-6){color:blue}
p:nth-child(2n-7){color:blue}
p:nth-child(2n-8){color:blue}
p:nth-child(2n-9){color:blue}
p:nth-child(2n-10){color:blue}
p:nth-child(2n-0){color:blue}
p:nth-child(2n+10){color:blue}
p:nth-child(n+8):nth-child(-n+15){color:blue}
p:nth-last-of-type(2n + 2){color:blue}
body>h2:not(:first-of-type):not(:last-of-type){color:blue}
.class:nth-child(1){color:red}
.class:nth-child(+1){color:red}
/* No */
.class:nth-child(-1){color:red}
.class:nth-last-child(1){color:red}
.class:nth-last-child(+1){color:red}
/* No */
.class:nth-last-child(-1){color:red}
.class:nth-of-type(1){color:red}
.class:nth-of-type(+1){color:red}
/* No */
.class:nth-of-type(-1){color:red}
.class:nth-last-of-type(1){color:red}
.class:nth-last-of-type(+1){color:red}
/* No */
.class:nth-last-of-type(-1){color:red}
.foo.foo.foo{}
.foo.foo.foo{color:red}
.class#id#id {color:red}
#id#id.class {color:red}
#id.class#id {color:red}
#id#id#id {color:red}
[attr][attr][attr] {color:red}
[attr].class[attr].class[attr] {color:red}
.foo.foo.foo#id#id#id[attr][attr][attr]{}