Open andersk opened 10 months ago
Thanks for the clean reproduction!
Does this cause any problems or is it just unexpected?
I think the reason it's runs twice is because the first is during CSS preprocessing (before Astro analyzes scope styles etc), and the second is after that where Vite processes it again, resolving css urls etc. I think we'd need stop the second processing in Vite, but currently there's no easy way to do so. I can take a look and see if Vite can expose something.
Astro Info
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
With this PostCSS configuration:
Astro expands
font-family: system-ui
tofont-family:system-ui, -apple-system, Segoe UI, Roboto, Noto Sans, Ubuntu, Cantarell, Helvetica Neue,Segoe UI,Roboto,Noto Sans,Ubuntu,Cantarell,Helvetica Neue
with every family duplicated. This is the result of running
postcss-font-family-system-ui
twice—looks like once before minification and once after, based on the spacing.What's the expected result?
I expect
font-family: system-ui, -apple-system, Segoe UI, Roboto, Noto Sans, Ubuntu, Cantarell, Helvetica Neue
as shown by
postcss-cli
with the same configuration.Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-didtjg?file=postcss.config.mjs,src%2Fpages%2Findex.astro
Participation