Re: spec reading: semantics elements and styling

Hi David,

> 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.

Thanks, that's much clearer than my rambling email.

> 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.

Yes. Can we add this to the WG tracker?

> That seems to be wrong.

I would agree but wanted to be sure.

Best,
Peter.

On Wed, Jan 14, 2015 at 10:41 AM, David Carlisle <davidc@nag.co.uk> wrote:

> 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 11:41:52 UTC