## CSS - [PostCSS](#postcss) - [CSS Modules](#css-modules) - [Pre-Processors](#pre-processors) - [Passing Options to Pre-Processor Loaders](#passing-options-to-pre-processor-loaders) ### PostCSS Vue CLI uses PostCSS internally, and enables [autoprefixer](https://github.com/postcss/autoprefixer) by default. You can configure PostCSS via `.postcssrc` or any config source supported by [postcss-load-config](https://github.com/michael-ciniawsky/postcss-load-config). ### CSS Modules You can [use CSS Modules in `*.vue` files](https://vue-loader.vuejs.org/en/features/css-modules.html) out of the box with ` ``` ### Passing Options to Pre-Processor Loaders Sometimes you may want to pass options to the pre-processor's webpack loader. You can do that using the `css.loaderOptions` option in `vue.config.js`. For example, to pass some shared global variables to all your Sass styles: ``` js // vue.config.js const fs = require('fs') module.exports = { css: { loaderOptions: { sass: { data: fs.readFileSync('src/variables.scss', 'utf-8') } } } } ``` This is preferred over manually tapping into specific loaders, because these options will be shared across all rules that are related to it.