master-co / css

The CSS Language and Framework
https://css.master.co
MIT License
1.78k stars 41 forks source link

🐞 Static extraction misses generating variables and related classes #337

Open 0Miles opened 6 months ago

0Miles commented 6 months ago

Description

When using Static Extraction,
classes like $something:$(custom-color) won't be generated, and variables defined in settings that are only used by this type of syntax won't be generated either.

Reproduction

  1. create a static extraction project
    npm create @master/css@rc project --example vite-with-static-extraction
    cd project
  2. set master.config.ts
    ...
    styles: {
    test: '$test:$(test-color)'
    },
    variables: {
    'test-color': 'rgb(0 1 2)'
    }
    ...
  3. build and check output css
    $test:$(test-color) and test-color will not appear in the output CSS.

System Informations

No response