Skip to content
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

Define Color Valued Attributes from CSS / HTML5 #62

Closed
fred-wang opened this issue Feb 28, 2019 · 10 comments
Closed

Define Color Valued Attributes from CSS / HTML5 #62

fred-wang opened this issue Feb 28, 2019 · 10 comments
Labels
css / html5 Issues related to CSS or HTML5 interoperability MathML Core Issues affecting the MathML Core specification MathML 4 Issues affecting the MathML 4 specification

Comments

@fred-wang
Copy link

See https://mathml-refresh.github.io/mathml/chapter2.html#fund.units

Let's just drop that definition and just refer to https://drafts.csswg.org/css-color/#typedef-color instead. This is what browsers are going to use.

@fred-wang fred-wang added MathML Core Issues affecting the MathML Core specification MathML 4 Issues affecting the MathML 4 specification css / html5 Issues related to CSS or HTML5 interoperability labels Feb 28, 2019
@fred-wang fred-wang changed the title Define Color Valued Attributes from CSS Define Color Valued Attributes from CSS / HTML5 Feb 28, 2019
@fred-wang
Copy link
Author

Or maybe it should be the HTML5 one: https://html.spec.whatwg.org/multipage/common-microsyntaxes.html#colours ?

@NSoiffer
Copy link
Contributor

NSoiffer commented Mar 4, 2019

I agree we should just use a pointer to the spec. Since this is in HTML and not CSS, I think the HTML spec is the appropriate one to reference.

@davidcarlisle
Copy link
Collaborator

I added a placeholder section to the core spec https://mathml-refresh.github.io/mathml-core/#color

@fred-wang fred-wang added compatibility Issues affecting backward compatibility and removed compatibility Issues affecting backward compatibility labels Mar 20, 2019
@fred-wang
Copy link
Author

cc @bkardell

What is Firefox seems to recognize HTML colors (similar to what is described in the MathML spec) while WebKit/Chromium accepts CSS colors. Compare this:

<p><math mathcolor="red"><mtext>red</mtext></math></p>
<p><math mathcolor="rgb(255,0,0)"><mtext>rgb(255,0,0)</mtext></math></p>

Whatever we decide, we will need WPT tests for these.

@rwlbuis
Copy link

rwlbuis commented May 6, 2019

I think CSS colors is the way to go since they offer alternative color specification like rgb, rgba and hsl.
SVG1.1 refers to CSS2:
https://www.w3.org/TR/SVG11/types.html#DataTypeColor
SVG2 refers to CSS3:
https://www.w3.org/TR/SVG2/painting.html#ColorProperty

It seems 'transparent' is supported for both mathcolor and mathbackground in Firefox and WebKit, so maybe it should be specified for both attributes.

@fred-wang fred-wang added the need tests Issues related to writing WPT tests label May 6, 2019
@fred-wang fred-wang added the need resolution Issues needing resolution at MathML Refresh CG meeting label May 16, 2019
@fred-wang
Copy link
Author

Resolution:

@bkardell, @NSoiffer @rwlbuis Not sure what it is meant by "we agree to go with color attributes". I think we decided to use the CSS syntax.

@fred-wang fred-wang added need implementation update need specification update Issues requiring specification changes and removed need resolution Issues needing resolution at MathML Refresh CG meeting labels May 16, 2019
@bkardell
Copy link
Collaborator

Sorry, that is poor minuting on my part. I believe that what I meant to type was something like "we agree to basically follow svg and point to css colors?"

Though, that should mean that both of the above in the example should work, right? red is a valid color name in css as a 'keyword' I think.

@fred-wang
Copy link
Author

Right that was my understanding too so yes the two syntaxes in #62 (comment) will work.

@fred-wang fred-wang removed the need specification update Issues requiring specification changes label Jun 5, 2019
@fred-wang
Copy link
Author

The spec now refers to CSS colors.

@NSoiffer
Copy link
Contributor

NSoiffer commented Mar 2, 2020

I believe that this is basically resolved so that the only appropriate labels are "needs tests" and "MathML 4" (that spec needs updating).

moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this issue May 27, 2020
…ckground uses the CSS definit…, a=testonly

Automatic update from web-platform-tests
Add test to ensure that mathcolor/mathbackground uses the CSS definition. (#23741)

w3c/mathml#62
--

wpt-commits: ebd814422b787abd65010176104861f3cc5b180b
wpt-pr: 23741
xeonchen pushed a commit to xeonchen/gecko that referenced this issue May 27, 2020
…ckground uses the CSS definit…, a=testonly

Automatic update from web-platform-tests
Add test to ensure that mathcolor/mathbackground uses the CSS definition. (#23741)

w3c/mathml#62
--

wpt-commits: ebd814422b787abd65010176104861f3cc5b180b
wpt-pr: 23741
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
css / html5 Issues related to CSS or HTML5 interoperability MathML Core Issues affecting the MathML Core specification MathML 4 Issues affecting the MathML 4 specification
Projects
None yet
Development

No branches or pull requests

5 participants