Open TimCrooker opened 2 days ago
This happens due to how custom media queries plugin works in postcss. Since breakpoints can't be resolved in runtime and are defined during the build process, you have to pass a path to the theme defining your theme media queries values when creating postcss config: https://reshaped.so/docs/getting-started/react/installation#installation
It seems like this piece can be mentioned in a few other places too, so I'll add similar information to the theming section
Sorry, I meant this part. Do you use the getConfig
function in your postcss config?
const path = require("path");
const { getConfig } = require("reshaped/config/postcss");
module.exports = getConfig({
themeMediaCSSPath: path.resolve(__dirname, "src/themes/my-theme/media.css"),
});
No you're right I misread your comment on my phone. I didn't see that part of the docs. I recommend you add it in the customizing your theme documentation where it references modifying breakpoints. Thanks for the help!
Will do, thanks!
Describe the bug I created a new theme and ran the CLI and the breakpoints are still the same as before adding the new breakpoints
Expected behavior Updating the breakpoints in the selected theme should then use those breakpoints throughout the application wherever applicable
Screenshots
Environment (please complete the following information):