W3C home > Mailing lists > Public > www-style@w3.org > May 2014

Re: [css-flexbox] Edits to testsuite have broken some submitted tests

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Thu, 22 May 2014 16:38:26 +0900
Message-ID: <CAAWBYDAYkZOK8bH+1agU92cb_x1ws_5Soebi=bnkokg3Ma2fsA@mail.gmail.com>
To: Daniel Holbert <dholbert@mozilla.com>
Cc: www-style <www-style@w3.org>
On Thu, May 22, 2014 at 10:10 AM, Daniel Holbert <dholbert@mozilla.com> wrote:
> The problem is that there's a <!-- --> comment in the <style> block,
> which is interpreted as a comment in XHTML but apparently not in HTML,
> and it neuters some style in the converted-to-HTML version.

Yeah, in HTML the contents of <style> are automatically CDATA and
passed through to the CSS parser literally.  The CSS parser accepts
and ignores the top-level <!-- token, but the text following that
starts up a selector that continues up to and including the
.centerparent selector of the following rule.

It's usually a good pattern to manually declare <style> as CDATA in
XHTML, which would have the same behavior, but as long as no >
combinators are used or any other troublesome characters in strings,
it's not necessary, so HTML comments work, since I think only the text
node children of the <style> block get sent through to the CSS parser.

Received on Thursday, 22 May 2014 07:39:14 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:42 UTC