Skip to content

This is my setup to use postcss for scss! ๐Ÿค” The script works. Feel free to copy if you've got something nitty gritty to do.

License

Notifications You must be signed in to change notification settings

yowainwright/postcss-scss

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

6 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Postcss scss ๐ŸŽจ

The setup of this repository is to be able to smoothly transition from scss to postcss and not need a postcss config in another project.

I think I was able to do it. Look at the config to decide for yourself!

Note: I made the browserlist really broad to ensure that autoprefixer is working (and it is!).


Install

npm install autoprefixer postcss postcss-advanced-variables postcss-cli postcss-nested postcss-scss
# ๐Ÿš€

Setup

"devDependencies": {
  "autoprefixer": "^10.2.5",
  "postcss": "^8.2.8",
  "postcss-advanced-variables": "^3.0.1",
  "postcss-cli": "^8.3.1",
  "postcss-nested": "^5.0.5",
  "postcss-scss": "^3.0.5"
},
// do not use this browserlist
// it was just used to insure autoprefixer is working
// Read https://github.com/postcss/autoprefixer#browsers for more detail ๐Ÿ“š
"browserslist": [
  ">0.2%",
  "not dead"
],
// the order of postcss execution matters below ๐Ÿ‘ฎโ€โ™€๏ธ
"scripts": {
  "build": "postcss src/index.scss --syntax postcss-scss -u postcss-nested -u postcss-advanced-variables autoprefixer -o dist/index.css"
}

Thanks to Craig Buckler for his great Sitepoint post. ๐Ÿ™

About

This is my setup to use postcss for scss! ๐Ÿค” The script works. Feel free to copy if you've got something nitty gritty to do.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages