14 ms·
For that example, you can drop the toString(), because it's already a string. I think it's a string by default because that css variable is untyped. You can def
by ihuman 5y ago
For that example, you can drop the toString(), because it's already a string. I think it's a string by default because that css variable is untyped. You can define the type with @property in css, or CSS.registerProperty in Javascript. Then you just need to call properties.get('--checkerboard-size').value, and drop the parseInt. Unfortunately, this solution also adds more boilerplate.
- seumars 5y agoThat’s the point