Re: spec reading: semantics elements and styling

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.
> (
> 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="">
>    <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.

(speaking personally)

Received on Wednesday, 14 January 2015 09:42:11 UTC