pstein Posted December 20, 2021 Share Posted December 20, 2021 (edited) Assume I have the following CSS rule in a *.css file: .foobar { aaa: 10px; /* blah blah blah comment */ bbb: 15px !important; ccc: something !important; } It works. Now I decide (e.g.for testing purposes) to disable the whole .foobar rule without deleting it: /* .foobar { aaa: 10px; /* blah blah blah comment */ bbb: 15px !important; ccc: something !important; } */ Unfortunately the inner comment end tag */ closes the outer comment block as well. How can I avoid this without deleting the inner comment block? Maybe there is second comment tag like "//" in Java which declares the remainder of the line right of it as comment Edited December 20, 2021 by pstein Link to comment Share on other sites More sharing options...
dsonesuk Posted December 20, 2021 Share Posted December 20, 2021 You cant have a nested comment within a comment, all you can do is close the beginning comment tag before nested comment, then a opening comment tag after nested comment for the end comment tag. /* .foobar { aaa: 10px; *//* blah blah blah comment *//* bbb: 15px !important; ccc: something !important; } */ Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now