File tree 1 file changed +27
-0
lines changed
1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -1807,6 +1807,33 @@ describe('Parsing themes values from CSS', () => {
1807
1807
` )
1808
1808
} )
1809
1809
1810
+ test ( 'theme values added as `static` will always be generated, regardless of whether they were used or not' , async ( ) => {
1811
+ expect (
1812
+ await compileCss (
1813
+ css `
1814
+ @theme static {
1815
+ --color-tomato : # e10c04 ;
1816
+ --color-potato : # ac855b ;
1817
+ --color-primary : var (--primary );
1818
+ }
1819
+
1820
+ @tailwind utilities;
1821
+ ` ,
1822
+ [ 'bg-tomato' ] ,
1823
+ ) ,
1824
+ ) . toMatchInlineSnapshot ( `
1825
+ ":root, :host {
1826
+ --color-tomato: #e10c04;
1827
+ --color-potato: #ac855b;
1828
+ --color-primary: var(--primary);
1829
+ }
1830
+
1831
+ .bg-tomato {
1832
+ background-color: var(--color-tomato);
1833
+ }"
1834
+ ` )
1835
+ } )
1836
+
1810
1837
test ( 'wrapping `@theme` with `@media theme(inline)` behaves like `@theme inline` to support `@import` statements' , async ( ) => {
1811
1838
expect (
1812
1839
await compileCss (
You can’t perform that action at this time.
0 commit comments