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

前端 未结 11 1735
梦如初夏
梦如初夏 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:10

    Just to add some further information and confirming the "only use /* comments" rule. A customer who has access to the website folder just choose by himself to comment out a single line using this:

    //*  comment here   *//
    

    Actually Chrome and Safari will ignore ANYTHING that follows this line; I would call it a "CSS killer".

提交回复
热议问题