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

Unitless CSS like line-height is now forced to pixels in v2.0.1 #839

Closed
repertor opened this issue Feb 12, 2018 · 1 comment
Closed

Unitless CSS like line-height is now forced to pixels in v2.0.1 #839

repertor opened this issue Feb 12, 2018 · 1 comment

Comments

@repertor
Copy link

repertor commented Feb 12, 2018

In v1, setting lineHeight: 5 set it to 5 in CSS, which is a valid value in CSS.

Now, in v2, it forces a px unit on that value, such that 5 is made into 5px

From MDN (https://developer.mozilla.org/en-US/docs/Web/CSS/line-height)

The used value is this unitless multiplied by the element's own font size.
The computed value is the same as the specified . In most cases, this is the preferred way to set line-height and avoid unexpected results due to inheritance.

I don't believe there are many unitless CSS possibilities, but this one is standard.

@Rycochet
Copy link
Collaborator

It definitely is standard, so that's something missed - will get this fixed and a specific test for it. There's a couple of unitless properties around, and where it can also do attributes it needs to have a little bit more understanding of how it works!

Rycochet added a commit that referenced this issue Aug 3, 2020
…t css styles are now set/get via a normalization instead of by fallback code Tweens are now an interface (object) instead of an enum indexed array Normalization function is now cached in tween at animation start for performance and consistency Internal version number is now set directly instead of indirectly

Fixes #849 - SVG attribute initialisation was crashing
Fixes #845 - Inconsistent handling of colour codes, now force rgba()
Fixes #839 - - Possibly mis-identification of lineHeight
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

2 participants