- From: Matthew Brealey <webmaster@richinstyle.com>
- Date: Wed, 09 Aug 2000 14:48:23 +0100
- To: Andrew n marshall <amarshal@zig.usc.edu>
- CC: www-style@w3.org
Andrew n marshall wrote: > > Should entities (like character entities) be expanded if included via the > content property? The answer is no. See, e.g, http://www.w3.org/TR/REC-CSS2/syndata.html#q24. This is because chracter references are an HTML concept. CSS is not a dialect of HTML and therefore does not use its concepts. For this, you should use the CSS escape mechanism, unsupported by all but Mac IE 5 and Mozilla 5. > For an example of what I am refering to, please see the > example page: > http://sclug.usc.edu/~amarshal/test/content-example.html Here: <!-- // Should be this way, but IE doesn't support it. // [class~="late"] { color: red; } .quote1:before { content: "“"; } .quote1:after { content: "”"; } .quote2 { quotes: "“" "”" } .quote2:before { content: open-quote; } .quote2:after { content: close-quote; } //--> you should note that // is not a valid CSS comment (although IE accepts it). and: //--> is not valid CSS. It is valid JavaScript however, where the // (comment) is used to hide the -->, which the JavaScript interpreter should otherwise interpret as a pre-increment operator. Since CSS is not a programming language, there is no need to comment (to the CSS parser) out the comment (to older HTML UAs, which would otherwise display the contents). [Note that CSS does not do named entities; you will have to learn (look up) the numeric ones.] ----------------------------------- Please visit http://RichInStyle.com. Featuring: MySite: customizable styles. AlwaysWork style Browser bug table covering all CSS2 with links to descriptions. Lists of > 1000 browser bugs Websafe Colorizer CSS2, CSS1 and HTML4 tutorials. CSS masterclass CSS2 test suite: 5000++ tests and 300+ test pages.
Received on Wednesday, 9 August 2000 09:42:26 UTC