I'm using Nextjs with sass(1.28.0). Unfortunately, the nested css styles are not applied in the webpage. Importing the below css file as auth.module.scss and there are no import errors also. This Application involves AMP pages as well. Correct me if i'm missing anything.
.loginForm{
width:300px;
.MuiFormControl-root{
width:100%;
margin-top:20px;
}
}
Here is the next.config.js
const withPWA = require('next-pwa')
const runtimeCaching = require('next-pwa/cache')
module.exports = withPWA({
pwa: {
dest: 'public',
runtimeCaching,
}
})
JSX
<div className={auth.loginForm}>
<TextField label="Email*" placeholder="Enter Email" autoComplete="current-email" />
</div>
important!might work but not a good approach - VibhavJSX.Please have a look. @Vibhav this app involves AMP pages also. Therefore, adding!importantto styles is not a good idea.Because, those styles will be removed by AMP scripts. - code_Knight