Click to See Complete Forum and Search --> : @import 'stylesheet.css'; without the space


boojum
07-15-2003, 04:02 PM
is @import'stylesheet.css'; legal? as in
@import 'stylesheet.css'; without the space. ie6sp1, firebird.6 and w3c css validator all have no problems with the first, spaceless way

DaveSW
07-15-2003, 04:06 PM
Originally posted by boojum
is @import'stylesheet.css'; legal? as in
@import 'stylesheet.css'; without the space. ie6sp1, firebird.6 and w3c css validator all have no problems with the first, spaceless way

it would appear to be. from looking at the css @import info. but doesn't it look neater with a space??

boojum
07-15-2003, 04:12 PM
yeah but im anal in that way

Charles
07-15-2003, 04:15 PM
at-rule : ATKEYWORD S* any* [ block | ';' S* ];

That's from the CSS2 spec. (http://www.w3.org/TR/REC-CSS2/syndata.html#syntax). The 'S*' part means that there should be zero or more white space characters betwen the ATKEYWORD (@{ident}) and what comes next.

boojum
07-15-2003, 04:18 PM
do you have a link to a guide for reading DTDs (or whatever that was, and DTDs)?

Charles
07-15-2003, 04:27 PM
For whatever that is (it's some kind of regular expression - a kind slightly different from the one with which I'm familiar) see http://www.w3.org/TR/REC-CSS2/grammar.html but it may not be much help.

For how to read a SGML DTD (and HTML is a type of SGML) do see http://www.w3.org/TR/html4/intro/sgmltut.html#h-3.3. XML (XHTML is HTML in XML) DTDs are a little bit different but if you can read one then you can read the other.