@@ -83,88 +83,7 @@ code {
8383 '--primary-color' ,
8484 '2' ,
8585 ( e ) => e . includes ( 'special' ) ,
86- ( e ) => e === '--5' ,
87- ]
88- ) ;
89- } ) ;
90-
91- it ( 'Shorten known css variables' , async ( ) => {
92- const knownClassNames = {
93- '--first-color' : '--a' ,
94- '--second-color' : '--b' ,
95- }
96-
97- await run (
98- `:root {
99- --first-color: #16f;
100- --second-color: #ff7;
101- --2: #000;
102- }
103-
104- #firstParagraph {
105- background-color: var(--first-color);
106- color: var(--second-color);
107- }
108-
109- #secondParagraph {
110- background-color: var(--second-color);
111- color: var(--first-color);
112- }
113-
114- #container {
115- --first-color: #290;
116- }
117-
118- #thirdParagraph {
119- background-color: var(--first-color);
120- color: var(--second-color);
121- }
122-
123- .section-title {
124- color: var(--primary-color, var(--black, #222));
125- }
126-
127- code {
128- --5: #555;
129- }` ,
130- `:root {
131- --a: #16f;
132- --b: #ff7;
133- --2: #000;
134- }
135-
136- #firstParagraph {
137- background-color: var(--a);
138- color: var(--b);
139- }
140-
141- #secondParagraph {
142- background-color: var(--b);
143- color: var(--a);
144- }
145-
146- #container {
147- --a: #290;
148- }
149-
150- #thirdParagraph {
151- background-color: var(--a);
152- color: var(--b);
153- }
154-
155- .section-title {
156- color: var(--primary-color, var(--0, #222));
157- }
158-
159- code {
160- --5: #555;
161- }` ,
162- [
163- '--primary-color' ,
164- '2' ,
165- ( e ) => e . includes ( 'special' ) ,
166- ( e ) => e === '--5' ,
167- knownClassNames ,
86+ ( e ) => e === '--5'
16887 ]
16988 ) ;
17089} ) ;
@@ -174,6 +93,7 @@ it('Support reloading. Now the plugin will reset mapped variables', async () =>
17493 await run ( `:root{--second-color: #ff7;--first-color: #16f;}` , `:root{--0: #ff7;--1: #16f;}` , [ ] ) ;
17594} ) ;
17695
96+
17797it ( 'Base array check or no array' , async ( ) => {
17898 await run ( `:root{}` , `:root{}` ) ;
17999} ) ;
0 commit comments