Skip to content

Commit d18d615

Browse files
committed
improv getClassNames test
1 parent cb336c5 commit d18d615

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

test/unit/getClassNames.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ const matchList = {
2929
".first .second": ["first", "second"],
3030
".first:hover": ["first"],
3131
".first::before": ["first"],
32+
"article": [], // semantic tags.
33+
"unknowntag": [],
3234

3335
// Advanced Selectors
3436
".first > .second#sdsa": ["first", "second"],
@@ -44,12 +46,13 @@ const matchList = {
4446
"test",
4547
],
4648
"@keyframes spin": [], // Keyframes
47-
from: [],
48-
to: [],
49+
"from": [],
50+
"to": [],
4951
"0%, 100%": [],
5052
"50%": [],
5153
"& .childclass": ["childclass"], // Native CSS & Nasting
5254
"&:hover": [],
55+
'.two[class*="test"]': ['two'], // "contains" selector
5356

5457
// Bootsrap Selectors
5558
".form-range:disabled::-moz-range-thumb": ["form-range"],
@@ -114,13 +117,19 @@ const matchList = {
114117
".md\\:text-3xl": ["md:text-3xl"],
115118
".dark .dark\\:bg-gray-800\\/50": ["dark", "dark:bg-gray-800/50"],
116119
".py-0\\.5": ["py-0.5"],
120+
".w-\\[1\\.5rem\\]": ['w-[1.5rem]'],
117121
".\\[\\&_a\\]\\:will-change-\\[padding-left\\2c _color\\] a": [
118122
"[&_a]:will-change-[padding-left,_color]",
119123
],
120124
".\\[\\&_a\\]\\:\\[transition\\:padding-left_cubic-bezier\\(\\.15\\2c 1\\.6\\2c \\.75\\2c 1\\)_300ms\\2c color_ease_300ms\\] a":
121125
[
122126
"[&_a]:[transition:padding-left_cubic-bezier(.15,1.6,.75,1)_300ms,color_ease_300ms]",
123127
],
128+
// <div class="[&>{sth}]:bg-green-50">lol</div>
129+
// <div class="[&_{sth}]:bg-green-50">lol</div>
130+
// <div class="[&_.{className}]:bg-green-50">lol</div>
131+
// <div class="[&_#{id}]:bg-green-50">lol</div>
132+
// <div class="[&_a]:[transition:padding-left_cubic-bezier(.15,1.6,.75,1)_300ms,color_ease_300ms] [&_a]:will-change-[padding-left,_color]">
124133
".-translate-x-1\\/2": ["-translate-x-1/2"], //negative
125134
".\\32xl\\:grid-cols-3": ["2xl:grid-cols-3"], //octal
126135
".\\3exl\\:p-8": [">xl:p-8"],
@@ -163,15 +172,6 @@ const matchList = {
163172
"[@supports(backdrop-filter:blur(0))]:bg-white/50",
164173
],
165174
".\\*\\:pt-4 > *": ["*:pt-4"], //global
166-
// <div class="[&>{sth}]:bg-green-50">lol</div>
167-
// <div class="[&_{sth}]:bg-green-50">lol</div>
168-
// <div class="[&_.{className}]:bg-green-50">lol</div>
169-
// <div class="[&_#{id}]:bg-green-50">lol</div>
170-
// <div class="[&_a]:[transition:padding-left_cubic-bezier(.15,1.6,.75,1)_300ms,color_ease_300ms] [&_a]:will-change-[padding-left,_color]">
171-
// '.one.h-[0.5rem].two[class*="test"]': [],
172-
// // const jsonString = '.s-w-0\\.5chat-e';
173-
// '.s-w-\\[1\\.5rem\\]chat-e';
174-
// const jsonString = '.s-group-\\[\\.is-published\\.play\\]\\:block-e';
175175
};
176176

177177
Object.entries(matchList).forEach(([selector, classes]) =>

0 commit comments

Comments
 (0)