Doist / ICE

The Lightweight JavaScript library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Inconsistent cross-browser results with $getStyle()

pmpinto opened this issue Β· comments

Hey @amix 😊

I'm trying to get the padding-top property of an element and I'm getting inconsistent results on Chrome and IE11.

body {
  padding-top: 6rem;
}
console.log($getStyle($body(), 'padding-top'));
console.log(window.getComputedStyle($body()).paddingTop);

On Chrome/Safari/Firefox (this is the expected result (6 * 16 = 96)):

// 96px
// 96px

On IE11:

// 6rem
// 96px

@pmpinto Fixed in the beta branch of the ist_libs.