antfu-collective / vitesse

🏕 Opinionated Vite + Vue Starter Template
https://vitesse.netlify.app/
MIT License
8.8k stars 932 forks source link

Typography styles are not generated in build mode (Attributify preset) #432

Closed impcyber closed 1 year ago

impcyber commented 1 year ago

Describe the bug

Problem

When using an attributify preset:

    presetAttributify({
      prefix: 'u-',
      strict: false,
      prefixedOnly: true,
    }),

and typography preset:

    presetTypography({
      cssExtend: {
        'h1': {
          'font-size': '2.5em',
          'line-height': 1.2,
          'font-weight': 'normal',
          'text-align': 'center',
          'margin': '0.4em auto',
        },
        // ... some other default syles
     })

Prefixed prose styles not being genereated after build, except this one:

.prose,[u-prose~="\~"]{...

Other generated prose styles has only a class selector without [u-prose~="\~"]:

.prose :where(h1,h2,h3,h4,h5,h6):not(:where(.not-prose,.not-prose *)){

Result

development: No problem, styles apply perfectly production: There is no default prefixed prose styles in output css file

Reproduction

https://stackblitz.com/edit/vitejs-vite-7czqvy?file=dist/assets/index.409b8591.css

System Info

System:
    OS: Linux 6.0 Manjaro Linux
    CPU: (12) x64 AMD Ryzen 5 1600 Six-Core Processor
    Memory: 7.22 GB / 15.56 GB
    Container: Yes
    Shell: 5.1.16 - /bin/bash
  Binaries:
    Node: 16.14.1 - ~/.nvm/versions/node/v16.14.1/bin/node
    npm: 8.13.2 - ~/.nvm/versions/node/v16.14.1/bin/npm
  Browsers:
    Firefox: 105.0.3

Used Package Manager

pnpm

Validations

impcyber commented 1 year ago

Wrong repository, sorry. Delete this issue please