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

Support Houdini Typed OM #882

Closed
2 tasks done
kof opened this issue Oct 11, 2018 · 1 comment
Closed
2 tasks done

Support Houdini Typed OM #882

kof opened this issue Oct 11, 2018 · 1 comment
Labels
complexity:low You can fix it, c'mon! feature request This will safe many lifes! houdini 🎩

Comments

@kof
Copy link
Member

kof commented Oct 11, 2018

Houdini typed values API can be polyfilled with a fallback to strings, so we can actually start using in the latest versions and get perf benefits.

https://ishoudinireadyyet.com/
https://developers.google.com/web/updates/2018/03/cssom

Current way:

  rule.style.margin = '5px';
  rule.style.margin // 5px

New way:

rule.attributeStyleMap.set('margin', CSS.px(10))
rule.attributeStyleMap.get('margin') // CSSUnitValue {value: 10, unit: 'px'}

We can easily feature test it and use the new API always when supported. We don't care about all the CSS.whatever methods, they should be polyfilled in a separate product, we should just use attributeStyleMap when available, it also supports old-style strings.

Todo

  • add conditional to DomRenderer
  • add documentation
@kof kof added feature request This will safe many lifes! complexity:low You can fix it, c'mon! labels Oct 11, 2018
@HenriBeck HenriBeck mentioned this issue Oct 12, 2018
13 tasks
@kof
Copy link
Member Author

kof commented Oct 27, 2018

Follow #795 for release updates

@kof kof closed this as completed Oct 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
complexity:low You can fix it, c'mon! feature request This will safe many lifes! houdini 🎩
Projects
None yet
Development

No branches or pull requests

1 participant