Hi Jack,
The exam tested many subjects in the W3C CSS2 spec, but I have a
feeling the question was poorly worded.  I think they were trying to
test using strings in CSS rules:
http://www.w3.org/TR/CSS21/syndata.html#strings

The spec says:
"It is possible to break strings over several lines, for esthetic or
other reasons, but in such a case the newline itself has to be escaped
with a backslash (\). For instance, the following two selectors are
exactly the same:

Example(s):
a[title="a not s\
o very long title"] {/*...*/}
a[title="a not so very long title"] {/*...*/}"


Otherwise, I agree with you on your other points.

--Stephen



On Wed, Dec 24, 2008 at 9:39 AM, Jack Timmons <[email protected]> wrote:
>
> On Wed, Dec 24, 2008 at 8:18 AM, Stephen Tang <[email protected]>
> wrote:
>>
>> Hi,
>> I was recently taking a CSS online exam, and I ran into a question I
>> have never encountered before.
>>
>> The multiple choice question question basically asked, "If a CSS rule
>> is too long on a single line, what character do you use to tell the
>> style sheet processors that the rule is continued on the next line?"
>> The possible answers were -, >, \, /, \\.
>>
>> I couldn't find anything the explicitly answer this question in the
>> W3C CSS spec, but I am wondering if the question was not quite
>> detailed enough.
>> I found these two links, which makes me think the answer is backslash
>> (\), used on long strings in CSS rules.
>> http://www.w3.org/TR/CSS21/syndata.html#characters
>> http://www.w3.org/TR/CSS21/syndata.html#strings
>>
>> Does this agree with any of your experiences?  Originally, I kept
>> thinking the question was about a series of long CSS rules on one line
>> (i.e. display: inline; padding-top: 2px;), but a semicolon would work
>> there, and it was not one of the answer choices.
>>
>> Thanks,
>> Stephen
>>
>
> I might have to question the credibility on the test, because there are no
> limitations to text files. Until a parser encounters a \n or \r (or any
> other combination), it's considered a single line.
>
> Now maybe there's a deep-lurking rule in CSS-land that covers this, but I
> can't see why it would need to be covered. Even if you turn word-wrap on,
> it's still considered a single line.
>
> I kinda hope someone knows otherwise, but I'm thinking not.
>
> --
> -Jack Timmons
> http://www.trotlc.com
>
______________________________________________________________________
css-discuss [[email protected]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to