Is it bad practice to comment out single lines of CSS with //?

前端 未结 11 1726
梦如初夏
梦如初夏 2020-12-01 02:45

I have recently started using // to \"comment\" out single lines of CSS code. I understand that I am not actually commenting out the line; I am just breaking it

11条回答
  •  隐瞒了意图╮
    2020-12-01 03:25

    I don't know how future and/or exotic browsers will interpret non-official hacks like //, so I’d rather stick with the appropriate notation:

    li {
        float:left;
        text-indent:0px;
        /* list-style-type:none; */
    }
    

提交回复
热议问题