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-typed-om] Should StylePropertyMap.set work even when the property is not in the property model? #501

Closed
darrnshn opened this issue Oct 27, 2017 · 2 comments

Comments

@darrnshn
Copy link
Collaborator

With StylePropertyMap.set, if I do something like

styleMap.set('width', '10px')

and the styleMap doesn't have 'width', the spec says it's a no-op ("If StylePropertyMap’s property model contains an entry for property, let entry be that entry. Otherwise, exit the algorithm."). Intuitively, set should work independent of whether width is in the property model or not right?

@tabatkins
Copy link
Member

Ah, yup, the "property model" is just the set of properties that the stylemap currently knows about. .set() shouldn't be consulting that in this way. It should check - there's a related plain-CSSOM issue about ordering properties by the way they're set, so the algo should check if the property is already in the property model and delete it if so, then append its value to the end.

@nainar
Copy link
Contributor

nainar commented Jan 30, 2018

Fixed by Tab's rewrite

@nainar nainar closed this as completed Jan 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants