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

CSS priority of mapped attributes #215

Closed
fred-wang opened this issue May 21, 2020 · 2 comments
Closed

CSS priority of mapped attributes #215

fred-wang opened this issue May 21, 2020 · 2 comments
Labels
css / html5 Issues related to CSS or HTML5 interoperability MathML Core Issues affecting the MathML Core specification

Comments

@fred-wang
Copy link

Note that this issue excludes rules that are already in the UA stylesheet, since specificity is defined by CSS. This is about attributes that are said to be "mapped to" a CSS property.

This was discussed in #171 ; for example, which color is used for <math style="color: blue" mathcolor="red">? The same question arises in HTML / SVG for mapped attributes. We should probably use the same wording / definitions as in these specifications. I don't believe there is a compat issue, since AFAIK all browsers behave the same for mapped attributes.

For example the color attribute in HTML: https://html.spec.whatwg.org/multipage/rendering.html#phrasing-content-3:font

@fred-wang fred-wang added MathML Core Issues affecting the MathML Core specification css / html5 Issues related to CSS or HTML5 interoperability need tests Issues related to writing WPT tests need resolution Issues needing resolution at MathML Refresh CG meeting need specification update Issues requiring specification changes labels May 21, 2020
@fred-wang fred-wang changed the title CSS specificity of mapped attributes CSS origin/specificity of mapped attributes May 22, 2020
@fred-wang fred-wang changed the title CSS origin/specificity of mapped attributes CSS priority of mapped attributes May 22, 2020
@fred-wang
Copy link
Author

Proposal: they presentational hints == author-level zero-specificity presentational hints part of the CSS cascade

https://www.w3.org/TR/css-cascade-3/#cascading
https://html.spec.whatwg.org/multipage/rendering.html#presentational-hints

@fred-wang
Copy link
Author

So reading again https://www.w3.org/TR/css-cascade-3/#cascading:

"For the purpose of this step, declarations that do not belong to a style rule (such as the contents of a style attribute) are considered to have a specificity higher than any selector."

while https://html.spec.whatwg.org/multipage/rendering.html#presentational-hints

"author-level zero-specificity presentational hints"

so style attribute wins over mapped attribute. Of course https://www.w3.org/TR/css-cascade-3/#cascading gives details for other rules.

@fred-wang fred-wang removed need resolution Issues needing resolution at MathML Refresh CG meeting need tests Issues related to writing WPT tests need specification update Issues requiring specification changes labels Jun 2, 2020
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
Projects
None yet
Development

No branches or pull requests

1 participant