Reputation: 594
...and if not, why not? :)
PHP and JS have this simple, intuitive, useful feature: You can place two slashes (//) to comment out everything from the slashes to the end of the line, without having to actually go to the line's end and place something that terminates the comment.
CSS hasn't had anything like this in my experience, but I'm wondering if maybe there's been some development there yet. And if not, does anyone know of a hack, a workaround, or a practice of some sort, that might mimic such a feature?
Upvotes: 0
Views: 165
Reputation: 1
With some browsers the "//" can be tolerated so you may try it if it works for you. But it is definitely not guarenteed to work and i dont think there is any widely known way to do this. There is software that will automatically close out the end of the line, or you can get into the habit of typing the /**/ and moving in between the two lines.
This pretty much covers this: Is it bad practice to comment out single lines of CSS with //?
Upvotes: 0
Reputation: 4047
I'm pretty sure there is no valid way to do an inline comment in CSS. If you have a reason to use a CSS preprocessor such as LESS or SASS, they'll let you do inline comments.
Your best bet may just be getting a text editor that can autocomplete the ending tag for the multiline comment.
Upvotes: 1