W3C home > Mailing lists > Public > www-math@w3.org > January 2015

Re: spec reading: semantics elements and styling

From: David Carlisle <davidc@nag.co.uk>
Date: Wed, 14 Jan 2015 09:41:38 +0000
Message-ID: <54B639D2.7040507@nag.co.uk>
To: <www-math@w3.org>
On 14/01/2015 09:19, Peter Krautzberger wrote:
> Hi,
>
> The spec reads
>
>  > The default rendering of a semantics element is the default rendering
> of its first child.
>
> (http://www.w3.org/Math/draft-spec/chapter5.html#mixing.semantic.elements)
>
> I'd take this to mean that (by default) the first child is rendered as
> if it stood alone.

That was the intention. I don't think that means that it should not be 
affected by a css rule matching children of semantics. As far as the 
mathml spec is concerned the "default" rendering is the intrinsic 
rendering not considering css. The fact that wrapping an element
in semantics can change the css matching is no different from the fact 
that wrapping in an mrow can change the css matching even though there 
again the spec says that the MathML behaviour of <mrow><mi>x</mi></mrow>
is the same as that of <mi>x</mi> they admit different css, or xpath, or 
JavaScript selections so in there are observable differences that are
out of scope of the MathML spec.

As noted elsewhere (somewhere:-) it would be a good idea to have a Note
that detailed all such interpretations and clarifications of mathNML for 
a browser environment.

> But that seems problematic in an HTML5 context.
>
> On the one hand, Firefox won't render the following mtable construction
> at full width
>
> <math display="block" xmlns="http://www.w3.org/1998/Math/MathML">
>    <semantics>
>      <mtable width="100%" mathbackground="red">
>        <mtr> <mtd><mi>x</mi></mtd> </mtr>
>      </mtable>
>      <annotation encoding="application/x-tex">x</annotation>
>    </semantics>
> </math>

That seems to be wrong.

>
> On the other hand, I would expect (in HTML5) that styling the semantics
> element (while poor practice) would affect the first child (and in fact
> it does in Firefox).

As Noted above I think that's OK.
>
> So I'm wondering how to reconcile these two points of view (and what
> else I might be missing here).
>
> Best wishes,
> Peter.
>

David
(speaking personally)
Received on Wednesday, 14 January 2015 09:42:11 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 14 January 2015 09:42:12 UTC