I read some time ago about a way to comment a css block in a such way that you only need to remove one end of the comment character set in case you want to uncomment the block later.
But I can't remember how it was done :( Maybe someone here does know :)
/* * /
.class { color: #ffa; }
/* */
The space between the *
and /
in the first line causes the comment block to be un-closed until the final, paired, */
on the last line.
If you close that space then the .class
css is un-commented.
For languages such as php and JavaScript the opening /*
in the last line can be replaced with a //
as a single-line comment:
/* */
$name = $_POST['first_name'] . " " . $_POST['last_name'];
// */
I think it's called 'lazy-commenting' or something, but I'm not sure.
来源:https://stackoverflow.com/questions/3712404/css-smarter-code-comments