CSS - smarter code comments

点点圈 提交于 2019-12-04 04:30:00
/* * /

.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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!