3 ms·
The reason CSS will never have //-style single-line comments is that the entire CSS language is parsed as a single line, so if you ever entered a //-style singl
by err4nt 5y ago
The reason CSS will never have //-style single-line comments is that the entire CSS language is parsed as a single line, so if you ever entered a //-style single line comment there would be no return from it for the rest of the input stream.
(Kind of like the <plaintext> element in HTML, once you write the <plaintext> open tag all text after that is plain text, so you can't write a </plaintext> to get out of it - the whole rest of the file is in that mode with no return)
- jamesfinlayson 5y agoOh I didn't know about that one - I thought I'd misremembered the <pre> tag's behaviour but now I see <plaintext> was deprecated in HTML 2.