[CSS21] WD 4.2: end-of-string vs. end-of-stylesheet

My reading of the end-of-string rules is that

      @media screen {
        p:before { content: 'Hello

...would be treated the same as:

      @media screen {
        p:before {

which conflicts with what is stated in the end-of-stylesheet rule
(both its normative text and its example).

I wonder whether the correct behaviour should depend on whether there's a
newline character between "Hello" and the end of stylesheet.  If so, then
that could be a problem for external stylesheets whose representation
doesn't allow the concept of "unterminated line".  For example, I believe
that in DOS/Windows environments, \r\n is traditionally considered a line
separator rather than terminator, and that files ending in \r\n are shown
in text editors (such as notepad) as having an empty last line.
Certainly there are other operating systems where the standard
representation of text files doesn't involve using an end-of-line
character.  It may well be that if this example were in an external
stylesheet with such an encoding then it should indeed be treated as
above rather than as in the existing end-of-stylesheet example.

In any case, the conflict between these rules as currently stated needs
removing one way or another.

It may be useful to clarify what is meant by "reaching the end of a
line", and it may be useful to clarify whether the correct behaviour
for the end-of-stylesheet example depends on whether there's a newline
character between "Hello" and the end of the stylesheet.

pjrm.

Received on Friday, 7 January 2011 20:14:53 UTC