twbs / rfs

✩ Automates responsive resizing ✩
MIT License
3.32k stars 216 forks source link

using rfs() in SCSS with PostCSS syntax doesnt work #461

Closed issam-seghir closed 1 year ago

issam-seghir commented 1 year ago

I'm using postcss , with sass (scss syntax) , and i want to use rfs() in postcss syntax like this :

i'm using vite and when i run build script the converted css file look like this :

:is(h1, h2, h3, h4, h5, h6) {
  font-size: rfs(4rem); /* not converted to rem 💢*/
  ...
}

image

issam-seghir commented 1 year ago

It works after adding rfs to postcssconfig and stopping and running the build script again

import postcssPresetEnv from "postcss-preset-env"; import rfs from "rfs"; export default { plugins: [ rfs({}), postcssPresetEnv({ stage: 1 }), ], };