Skip to content
This repository has been archived by the owner on May 5, 2024. It is now read-only.
/ postcss Public archive

⚠️ MOVED: https://github.com/svelte-add/svelte-add/ ⚠️ Add PostCSS to your Svelte project

License

Notifications You must be signed in to change notification settings

svelte-add/postcss

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🔺 Add PostCSS to Svelte

GitHub issues by-label GitHub issues by-label

This is an adder for svelte-add; you should read its README before continuing here.

➕ Adding PostCSS

This adder's codename is postcss, and can be used like so:

npx svelte-add@latest postcss

🏞 Supported environments

This adder supports SvelteKit and Vite-powered Svelte apps (all the environments svelte-add currently supports).

⚙️ Options

  • autoprefixer (default true): whether or not to install and set up Autoprefixer.
npx svelte-add@latest postcss --postcss-autoprefixer

🛠 Using PostCSS

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.