-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Definition of MathML Length #63
Comments
@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. |
Agreed on https://lists.w3.org/Archives/Public/public-mathml4/2019Mar/0007.html "General agreement that all named lengths and unitless precents (#24, #4, #7), should be removed from the core" Still need to be more explicit about the MathML lengths w3c/mathml#63
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. |
Yes, I guess we should use whatever is used in browsers... Using definitions in WHATWG's HTML5 could probably avoid the version number issues. |
I opened #75 for the namedspace discussion. |
can we also get rid of the string constants
|
That's #75 |
On 29/4/19 call, agreed to drop unitless values except 0 from core. The full spec will continue to allow namedspaces. |
I am doing an experiment to support MathML lengths using CSS subsystem in chromium, same as SVG does for its attributes. Findings:
|
Another interesting point is whether to support exponents or not. For SVG 2 it just refers to CSS, so will support exponents: |
The decision from the meeting was that MathML core should accept the same
values/syntax as CSS. MathML full is similar except that it adds the named
spaces.
If CSS supports exponents, that MathML should do so also. Same for new
units. Potentially, the full spec could discourage viewport relative units
because they are not meaningful in not CSS environments.
…On Thu, May 2, 2019 at 11:41 AM Rob Buis ***@***.***> wrote:
Another interesting point is whether to support exponents or not.
For SVG 1.1 it is supported for attributes but not in stylesheets:
https://www.w3.org/TR/SVG11/types.html#DataTypeLength
For SVG 2 it just refers to CSS, so will support exponents:
https://svgwg.org/svg2-draft/geometry.html#Y (length-percentage link)
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#63 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AALZM3HCUWPLHPEXKLVBR6TPTMYW7ANCNFSM4G24HP5A>
.
|
@rwlbuis What about CSS variables? ( https://drafts.csswg.org/css-variables/ ) I'm wondering whether we can do things like:
or even
which would give users the possibility to do things removed elsewhere ( #75 #5 #4 ...). |
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. |
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 |
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 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). |
Resolution:
|
The core spec now refers to from CSS. |
There are tests for that, so closing. |
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:
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.
The text was updated successfully, but these errors were encountered: