Reputation: 3112
In CSS, you can comment out code using /* */.How to comment code inside style jsx
in NextJS.I searched for this on the Internet but nothing was found.
<style jsx>{`
table,th,td{
border: 2px solid black;
}
#OOP{
//height: 10vh;
/*background-color: #28DE65;*/
//Both of these comment styles doesn't work inside style jsx
}
`}</style>
Upvotes: 1
Views: 2478
Reputation: 1661
CSS commenting works in <style jsx>
in next.js
. You might have missed/misconfigured something.
Demo 👇
Upvotes: 1
Reputation: 35
You can prefix by _
, it's not a comment but attribut are not interpreted :
<style jsx>{`
table,th,td{
border: 2px solid black;
}
#OOP{
__height: 10vh;
__background-color: #28DE65;
}
`}</style>
Not elegant solution, but it works ;-)
Upvotes: 1