Skip to content

getEmSize had wrong Syntax for 'getComputedStyle' #93

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

Merged
merged 1 commit into from
Feb 17, 2016

Conversation

sebilasse
Copy link
Contributor

  • The function getEmSize had a wrong Syntax for 'getComputedStyle',
    the 2nd parameter is only for pseudo selectors and it will return all styles, see docs
  • The function convertToPx did not work for floats, I guess ...
    E.g. 1.8rem's units became '.8rem' and so the switch failed...

Corrected both...

• The function getEmSize had a wrong Syntax for 'getComputedStyle',
the 2nd parameter is only for pseudo selectors and it will return all styles, see [docs](https://developer.mozilla.org/en-US/docs/Web/API/Window/getComputedStyle?redirectlocale=en-US&redirectslug=DOM%2Fwindow.getComputedStyle)
• The function convertToPx did not work for floats, I guess ...
  E.g. `1.8rem`'s units became '.8rem' and so the switch failed...

Corrected both.
@marcj
Copy link
Owner

marcj commented Feb 17, 2016

Good catch, thank you! :)

marcj added a commit that referenced this pull request Feb 17, 2016
getEmSize had wrong Syntax for 'getComputedStyle'
@marcj marcj merged commit ace45eb into marcj:master Feb 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants