#00AF33
14306
0
1
Sept 8, 2023 8:54:17 GMT -8
Jordan
What is truth?
11,838
October 2003
jab2
|
Post by Jordan on Jun 29, 2010 9:44:10 GMT -8
CSS doesn't support single-line comments, hence // breaks it. I'd still like if someone could expand upon using CDATA in CSS. >_< The same reason you use it on scripts: to declare the content as inconsequential to the DOM. CSS isn't markup thus it shouldn't sit in an SGML/XML document as such. Declaring the content of the stylesheet as character data does just that. I don't really see why the developers made this necessary when you have the <script></script> and <style></style> tags. Obviously the content inside them is going to be character data, so what's the point? I'm not saying to not do it, I just don't see why they decided to make us add them. Is it just easier for the engine to parse?
|
|
inherit
130228
0
Jul 11, 2024 19:19:59 GMT -8
Charles Stover
1,731
August 2008
gamechief
|
Post by Charles Stover on Jun 30, 2010 5:34:45 GMT -8
The same reason you use it on scripts: to declare the content as inconsequential to the DOM. CSS isn't markup thus it shouldn't sit in an SGML/XML document as such. Declaring the content of the stylesheet as character data does just that. I don't really see why the developers made this necessary when you have the <script></script> and <style></style> tags. Obviously the content inside them is going to be character data, so what's the point? I'm not saying to not do it, I just don't see why they decided to make us add them. Is it just easier for the engine to parse? Yes. It allows an XML engine to parse it. An HTML engine knows it's character data. An XML engine doesn't.
|
|