-
Notifications
You must be signed in to change notification settings - Fork 22.6k
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
Remove ElementCSSInlineStyle mixin #5556
Conversation
Preview URLs
FlawsNote! 8 documents with no flaws that don't need to be listed. 🎉 URL:
URL:
URL:
URL:
URL:
URL:
URL:
URL:
URL:
URL:
URL:
URL:
URL:
URL:
URL:
URL:
URL:
External URLsURL: No new external URLs URL: No new external URLs URL: No new external URLs URL: No new external URLs URL: No new external URLs URL: No new external URLs URL: No new external URLs URL: No new external URLs URL: No new external URLs URL: No new external URLs URL: No new external URLs URL: No new external URLs URL: No new external URLs URL: No new external URLs URL: No new external URLs URL: No new external URLs URL:
URL: No new external URLs URL: No new external URLs URL: No new external URLs URL: No new external URLs URL: No new external URLs URL: No new external URLs URL: No new external URLs URL: No new external URLs (this comment was updated 2021-06-07 18:03:59.475773) |
|
||
<dl> | ||
<dt>{{DOMxRef("MathMLElement.attributeStyleMap")}} {{ReadOnlyInline}}</dt> | ||
<dd>A {{DOMxRef("StylePropertyMap")}} representing the declarations of an element's style.</dd> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's most obvious here, but for all three interfaces the descriptions for attributeStyleMap
and style
are exactly the same. I'm really not sure how to describe these in a way that makes the right distinction. Halp?
@andruud might know :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The attributeStyleMap
and style
properties are two different views of exactly the same thing. The distinction is apparent in the return value type (StylePropertyMap
vs CSSStyleDeclaration
), and it seems fine to me that the description should be the same beyond that. 🤷♂️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. So is it accurate to say what https://developer.mozilla.org/en-US/docs/Web/API/ElementCSSInlineStyle/style currently does, that it represents the style
content attribute? I edited that out in this PR because it's possible to modify element.style
and I thought such modifications aren't reflected in the style
content attributes, but it looks like actually I'm wrong. These are both complicated reflected attributes, then?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Regardless of whether or not it's possible to be more accurate (we want to be a bit more "humane" here than in CSS specifications, right?), saying that [attributeStyleMap
, style
property] represents the style
attribute sounds appropriate to me.
reflected attributes
Not sure if that's a HTML spec term or something, but yes, attributeStyleMap
, the style
property and the style
attribute all access and represent the same underlying inline style.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this need not pedantically match what the spec says. These aren't reflected attributes in the sense of https://html.spec.whatwg.org/multipage/common-dom-interfaces.html#reflecting-content-attributes-in-idl-attributes, but that's just because it's a more complicated value and not just the element.attribute = value
pattern.
So I'll put back the mention of the style
content attributes, which was accurate then.
Hi @foolip happy to approve & merge once conflicts have been resolved - lmk 👍 |
3b062a7
to
48e7965
Compare
Redirect ElementCSSInlineStyle.style to HTMLElement.style, as that's seemingly what many of these instances pointed at originally, and it's the most common case when used in examples/explanations. Of the six pages that should exist here, only HTMLElement.style actually exists. BCD cleanup: mdn/browser-compat-data#10686
48e7965
to
a8bffff
Compare
@Rumyra, this is rebased now, thanks for your help! |
Redirect ElementCSSInlineStyle.style to HTMLElement.style, as that's
seemingly what many of these instances pointed at originally, and it's
the most common case when used in examples/explanations.
Of the six pages that should exist here, only HTMLElement.style actually
exists.
BCD cleanup: mdn/browser-compat-data#10686