ampproject / ampproject/worker-dom

Can't set value "0" for CSS style

Open
#141 0 comments 0 reactions 1 assignee Claimed by @kristoferbaxter View on GitHub
Dominant language
TypeScript
Stars
3.3k
Forks
154
PR merge metrics
No merged PRs in 30d

Description

Example of code that doesn't work:
`element.style.top = 0`

Below is checking value for truthy, which causes it to ignore 0:
https://github.com/ampproject/worker-dom/blob/master/src/worker-thread/css/CSSStyleDeclaration.ts#L108

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.