emerald
Adding a class or css to div id='__nuxt' the right way
Thanks! I’m already doing this and it works great, sorry I phrased my last message badly. It’s specifically the div with ID __nuxt that is automatically added. Ideally I would just add a class to it or remove it entirely to the body. In the issue Victor shared there is a change coming in an update coming that will resolve this. Also with the ability to hide or change the id value for privacy reasons
14 replies
Adding a class or css to div id='__nuxt' the right way
Thanks everyone. I’m actually moving over from 2 years of next.js to nuxt so I apologise for my lack of knowledge. In next the body tag is exposed and any classes/id are dynamically added to the DOM which has worked great for me.
In the end I went with the APPLY approach in a css file, I wasn’t planning to even have a global css file but I wanted to add some handy utilities like removing scrollbars etc so this has worked for me. I’ll update this post if I find a better way
14 replies