This is an adder for svelte-add
; you should read its README
before continuing here.
This adder's codename is postcss
, and can be used like so:
npx svelte-add@latest postcss
This adder supports SvelteKit and Vite-powered Svelte apps (all the environments svelte-add
currently supports).
autoprefixer
(default true
): whether or not to install and set up Autoprefixer.npx svelte-add@latest postcss --postcss-autoprefixer
After the adder runs,
You can write PostCSS syntax in the style lang="postcss"
blocks in Svelte files.
You can write PostCSS syntax in the src/app.pcss
file.
This is your global stylesheet because it will be active on every page of your site.
You can install more PostCSS plugins and configure them in the postcss.config.cjs
file.