Sass vs CSS performance - Wordpress

I'm thinking about adding SASS in our WP theme. We have custom built theme, fully optimized combined with Cloudflare, VPS and image optimization most of websites load around 1s, which is amazing for Wordpress

So in terms of speed, will Sass slow down website or not? In terms of development sass will make it faster but loading speed of website is more important.

Any feedback is appreciated.

2 answers

  • answered 2018-10-11 19:01 Dylan

    Sass compiles to CSS, so it will have no effect on load times.

  • answered 2018-10-11 19:06 therecluse26

    I think there's a little bit of confusion regarding what Sass does. Sass isn't actually run in browser itself, it's a CSS "preprocessor" which means that it compiles into vanilla CSS before it's used anywhere on the web. It's all CSS at the end of the day when it comes to what the browser sees, the power of Sass lies in development with variables, mixins, nesting, inheritance, etc. I'd definitely recommend going that route for pretty much any project. There's not much of a downside, to be honest.

    When you write Sass and want to use it on the web, you'd run something like this on the command line to compile it down to standard CSS sass source/stylesheets/index.scss build/stylesheets/index.css and include the build/stylesheets/index.css in your HTML template.