Chris Kennon wrote:
In the following why is it appropriate to classify the import rule as CDATA?
<style type="text/css" media="screen">
/* <![CDATA[ */
@import url(c/core.css);
/* ]]> */
</style>

You use CDATA to tell an XML aware parser to ignore something (where "ignore" can either be interpreted by the parser as "don't process, but leave it in" or "completely remove", depending on implementation). This is usually recommended for javascript and CSS when you're moving to XHTML (in the simplest case, ampersands and < > symbols in the javascript or CSS can cause validation errors, in the worst case - when serving as application/xhtml+xml or similar, they could make the whole document malformed and thus not display at all).

Having said that, as you're only using an import rule, you could get rid
of the whole CDATA shebang - provided that you don't add any other
CSS later that may contain those characters).

To be completely on the safe side, create a new CSS file which only
contains the @import rule, and then <link> that in your document,
circumventing the potential problem completely.

--
Patrick H. Lauke
_____________________________________________________
re�dux (adj.): brought back; returned. used postpositively
[latin : re-, re- + dux, leader; see duke.]
www.splintered.co.uk | www.photographia.co.uk
http://redux.deviantart.com

******************************************************
The discussion list for  http://webstandardsgroup.org/

See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
******************************************************



Reply via email to