W3C home > Mailing lists > Public > www-math@w3.org > August 2004

Re: MathML in CSS

From: Bruce Miller <bruce.miller@nist.gov>
Date: Thu, 05 Aug 2004 10:51:13 -0400
Message-ID: <41124961.9010801@nist.gov>
To: White Lynx <whitelynx@operamail.com>
Cc: www-math@w3.org

White Lynx wrote:
> Hello Bruce,
> Nice to see that work on CSS3 math module is in progress.
Thanks; And thanks for the links; I've found your
CSS work to be extremely helpful.

> I have a few comments on proposed CSS3 extensions
>>The proposal would be that single characters used as border components 
>>would be stretched horizontally or vertically (according to which border it applied to), 
>>and further that the components are stretched in such a way as to `meet at the corners'.
> IMHO using stretchy character borders is too sophisticated solution that drastically
> depends on fonts. I think that more simple and reliable way is to introduce appropriate
> border styles, like 'border-style:curly;' 

Well, the beauty --- and the danger --- is that it's open-ended.
But in fact, limiting it to a more finite set would have little 
impact on MathML; the most interesting cases would still require
explicit rules with selectors looking for '(' at the beginning of a row,
repeated for '{', repeated for '[', etc, etc.  So whether the character
itself is used in the property, or some other name doesn't matter much.
The set of reasonable border-styles is somewhat large, but not huge.
But, you're probably right that it is likely to end up depending too much
on fonts.

I'll add that as an alternative.  When I run that by the CSS crowd,
I'll see which approach they prefer.

>>Fraction alignment
>>Our stylesheet uses display:inline-table for fractions. 
>>According to the Specification (next to last paragraph on page), the baseline of 
>>an inline-table should be the baseline of the first row. 
>>However, neither of the browsers I've tried respect this. 
>>If they did, we could presumably align fractions properly using something like:
>> mfrac > *:first-child { vertical-align:bottom; }
>> mfrac { vertical-align:0.6ex; }
>>where the 0.6ex is intended to account for the 1/2 ex, plus the distance 
>>from the fraction line to the bottom of the numerator. 
>>If that understanding is correct, then fraction alignment should be 
>>possible (modulo some ad-hoc fudge factors), without any CSS extensions at all.
> I fear it is not sufficient. What you suggest, aligns baseline of numerator
> with baseline of text and then shifts it up by half ex.

My hope was that the 1st rule above 
   mfrac > *:first-child { vertical-align:bottom; }
would set the baseline of the numerator to be it's bottom, 
and that _that_ would become the baseline of the fraction.
It may be that I'm thinking too much in TeX terms, however?

[This may also be a case where a strategic ::outside would allow us to
mess with the display & positioning of the numerator, without affecting it's
internal layout]

> Unfortunately position of baseline of numerator heavily depends on its content
> (it may contain nested fractions, subscripts, indexed sums etc. that  shift baseline
> upwards and spoil vertical centering of fraction). What we need is to align BOTTOM
> of numerator with middle (or baseline + 0.5ex) of text. So I think issue is open.

Thanks for your comments!

Received on Thursday, 5 August 2004 10:51:57 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 5 February 2014 07:13:40 UTC