@@ -124,6 +124,95 @@ test('generates default utilities and responsive variants', () => {
124124 return generatePluginCss ( testConfig ) . then ( css => expect ( css ) . toMatchCss ( expectedCss ) )
125125} )
126126
127+ test ( 'modifier can contain fractions' , ( ) => {
128+ const testConfig = {
129+ theme : {
130+ columnGap : { '1/2' : '50%' } ,
131+ } ,
132+ }
133+ const expectedCss = `
134+ .col-count-1 { column-count: 1 }
135+ .col-count-2 { column-count: 2 }
136+ .col-count-3 { column-count: 3 }
137+
138+ .col-gap-sm { column-gap: 1rem }
139+ .col-gap-md { column-gap: 1.5rem }
140+ .col-gap-lg { column-gap: 2rem }
141+ .col-gap-1\\/2 { column-gap: 50% }
142+
143+ .col-w-sm { column-width: 120px }
144+ .col-w-md { column-width: 240px }
145+ .col-w-lg { column-width: 360px }
146+
147+ .col-rule-tailwind { column-rule-color: #38b2ac }
148+
149+ .col-rule { column-rule-width: 1px }
150+ .col-rule-sm { column-rule-width: 2px }
151+ .col-rule-md { column-rule-width: 4px }
152+ .col-rule-lg { column-rule-width: 8px }
153+
154+ .col-rule-none { column-rule-style: none }
155+ .col-rule-hidden { column-rule-style: hidden }
156+ .col-rule-dotted { column-rule-style: dotted }
157+ .col-rule-dashed { column-rule-style: dashed }
158+ .col-rule-solid { column-rule-style: solid }
159+ .col-rule-double { column-rule-style: double }
160+ .col-rule-groove { column-rule-style: groove }
161+ .col-rule-ridge { column-rule-style: ridge }
162+ .col-rule-inset { column-rule-style: inset }
163+ .col-rule-outset { column-rule-style: outset }
164+
165+ .col-fill-auto { column-fill: auto }
166+ .col-fill-balance { column-fill: balance }
167+ .col-fill-balance-all { column-fill: balance-all }
168+
169+ .col-span-none { column-span: none }
170+ .col-span-all { column-span: all }
171+
172+ @media (min-width: 640px) {
173+ .sm\\:col-count-1 { column-count: 1 }
174+ .sm\\:col-count-2 { column-count: 2 }
175+ .sm\\:col-count-3 { column-count: 3 }
176+
177+ .sm\\:col-gap-sm { column-gap: 1rem }
178+ .sm\\:col-gap-md { column-gap: 1.5rem }
179+ .sm\\:col-gap-lg { column-gap: 2rem }
180+ .sm\\:col-gap-1\\/2 { column-gap: 50% }
181+
182+ .sm\\:col-w-sm { column-width: 120px }
183+ .sm\\:col-w-md { column-width: 240px }
184+ .sm\\:col-w-lg { column-width: 360px }
185+
186+ .sm\\:col-rule-tailwind { column-rule-color: #38b2ac }
187+
188+ .sm\\:col-rule { column-rule-width: 1px }
189+ .sm\\:col-rule-sm { column-rule-width: 2px }
190+ .sm\\:col-rule-md { column-rule-width: 4px }
191+ .sm\\:col-rule-lg { column-rule-width: 8px }
192+
193+ .sm\\:col-rule-none { column-rule-style: none }
194+ .sm\\:col-rule-hidden { column-rule-style: hidden }
195+ .sm\\:col-rule-dotted { column-rule-style: dotted }
196+ .sm\\:col-rule-dashed { column-rule-style: dashed }
197+ .sm\\:col-rule-solid { column-rule-style: solid }
198+ .sm\\:col-rule-double { column-rule-style: double }
199+ .sm\\:col-rule-groove { column-rule-style: groove }
200+ .sm\\:col-rule-ridge { column-rule-style: ridge }
201+ .sm\\:col-rule-inset { column-rule-style: inset }
202+ .sm\\:col-rule-outset { column-rule-style: outset }
203+
204+ .sm\\:col-fill-auto { column-fill: auto }
205+ .sm\\:col-fill-balance { column-fill: balance }
206+ .sm\\:col-fill-balance-all { column-fill: balance-all }
207+
208+ .sm\\:col-span-none { column-span: none }
209+ .sm\\:col-span-all { column-span: all }
210+ }
211+ `
212+
213+ return generatePluginCss ( testConfig ) . then ( css => expect ( css ) . toMatchCss ( expectedCss ) )
214+ } )
215+
127216test ( 'variants can be customized' , ( ) => {
128217 const testConfig = {
129218 variants : {
0 commit comments