Repository navigation
Description
I think it's not nice that we have a definition of MathML Length different from CSS, but I guess we cannot really solve this.
The RelaxNG pattern is pattern = '\s*((-?[0-9]([0-9].?|.[0-9])[0-9](e[mx]|in|cm|mm|p[xtc]|%)?)|(negative)?((very){0,2}thi(n|ck)|medium)mathspace)\s*'
The definition is https://mathml-refresh.github.io/mathml/chapter2.html#fund.units
Note that "Since some applications are inconsistent about normalization of whitespace, for maximum interoperability it is advisable to use only a single whitespace character for separating parts of a value. Moreover, leading and trailing whitespace in attribute values should be avoided. ". I think we should be more explicit about white spaces...
My proposal is to:
- Be explicit about allowing leading/trailing space characters, as defined in Align definition of space characters with HTML5 #21
- Remove support from nonzero unitless value Remove support for nonzero unitless values for MathML lengths #24
- Replace definition of number with HTML5 Align definition of numbers with CSS #23
Then this definition should go into MathML Core.
Update: Some people proposed to actually removed namedspace values too #75 which would make things even closer to HTML/CSS lengths.
Activity
davidcarlisle commentedon Mar 5, 2019
@fred-wang I added a placeholder section to the core draft, feel free to edit, I sketched out dropping all support for mathml-specific length syntax from core, including named lengths. that may be too aggressive or controversial, I also added markup to allow links back to this issue tracker.
Remove deprecated nonzero unitless values for MathML lengths #24
dani31415 commentedon Mar 14, 2019
CSS currently have 3 levels
If a match between MathML and HTML5 has to be done, a level from the above list has also to be chosen.
fred-wang commentedon Mar 14, 2019
Yes, I guess we should use whatever is used in browsers... Using definitions in WHATWG's HTML5 could probably avoid the version number issues.
fred-wang commentedon Mar 19, 2019
I opened #75 for the namedspace discussion.
physikerwelt commentedon Mar 31, 2019
can we also get rid of the string constants
fred-wang commentedon Mar 31, 2019
That's #75
NSoiffer commentedon Apr 30, 2019
On 29/4/19 call, agreed to drop unitless values except 0 from core.
The call agreed that the handling of whitespace in attribute values should follow whatever CSS does.
The full spec will continue to allow namedspaces.
5 remaining items
rwlbuis commentedon May 7, 2019
That is a great find, I forgot about them. I verified that in chromium CSS variables works in the SVG-in-HTML case, so it seems the way to go, but we may want to check with the SVG WG.
NSoiffer commentedon May 13, 2019
Interesting!
First off, caniuse says that this is implemented in all the major modern browsers. So it seems safe to use.
Does this really allow us to keep named quantity such as
mediumspaceandthickin the spec, or just provide an easy target for polyfills? It seems they would need to have the--prefix, but maybe that is something that is easy for a browser implementation to do?bkardell commentedon May 13, 2019
Not sure I'm following so feel free to ignore if I've misunderstood but
-- is supposed to be reserved for author space afaik there's no precedent for browsers setting variables in this particular way (note: should look up recentish discussions about environment properties as the discussion is probably relevant and I could be wrong).. but.. CSS has always had this mechanism for non standard extension of all of it's 'parts' ( properties, pseudoclasses, fns, etc) so that the parser can stay forward compatible. The pattern has always been dash, vendor prefix, dash - like
-moz-blah. Custom anything in CSS will follow this same pattern, it's just that there is no vendor prefix, so you get -- meaning author defined rather than vendor defined.That said, variables in CSS are actually custom properties - and that's a thing vendors have been doing, as I say, forever.
otherwise they are just vendor prefixed things without a vendor (ie -moz-blah becomes -- because there is no vendor).
fred-wang commentedon May 16, 2019
Resolution:
fred-wang commentedon Jun 5, 2019
The core spec now refers to from CSS.
fred-wang commentedon Sep 16, 2019
There are tests for that, so closing.