Complete the code to enable SCSS preprocessing in a Svelte component.
<style lang="[1]"> h1 { color: blue; } </style>
Using lang="scss" tells Svelte to preprocess the styles with SCSS.
Complete the code to import a PostCSS plugin in the Svelte config file.
import { postcss } from 'svelte-preprocess'; import autoprefixer from '[1]'; export default { preprocess: [ postcss({ plugins: [autoprefixer()] }) ] };
The autoprefixer plugin adds vendor prefixes automatically in PostCSS.
Fix the error in the Svelte component style tag to correctly use PostCSS.
<style lang="[1]"> :global(body) { margin: 0; } </style>
Using lang="postcss" enables PostCSS preprocessing in Svelte styles.
Fill both blanks to configure SCSS preprocessing with source maps in Svelte config.
import sveltePreprocess from '[1]'; export default { preprocess: sveltePreprocess({ scss: { sourceMap: [2] } }) };
svelte-preprocess is the package for preprocessing. Setting sourceMap: true enables source maps for easier debugging.
Fill all three blanks to create a Svelte component using SCSS with a nested style and a PostCSS plugin.
<script> export let color = 'red'; </script> <style lang="[1]"> .box { color: [2]; &:hover { color: darken([3], 10%); } } </style>
Use lang="scss" for SCSS preprocessing. The variable color is used in styles, and it must be passed as a string 'color' inside the darken() function.