luqin / react-icheck

:radio_button: iCheck components built with React. Highly customizable checkbox, radio buttons and radio group.
https://luqin.github.io/react-icheck
177 stars 40 forks source link

Fixed "position: relative" issue #15

Closed Zagitta closed 8 years ago

Zagitta commented 8 years ago

Hello and first of all thanks for the great port of iCheck to react! I've run into some issues where position: relative needed to manually be added to each css theme style like done on the example site.

After some digging it turns out this is because of an incorrect port of https://github.com/fronteed/icheck/blob/cf738c22bd543f99cdf76febb207371b1be8f611/icheck.js#L186 which uses jquery's css() function that under the hood calls getComputedStyle, style.position will only have a value in case it's set directly which as far as I can tell will never happen.

I've removed the unneeded position: relative from the demo site and fixed the issue in this

thj-dk commented 8 years ago

Thanks for this! Would love to see it merged @luqin :+1:

Zagitta commented 8 years ago

Excellent thanks a lot, if I also could get you to publish it on NPM I'd be very greatful :smile:

luqin commented 8 years ago

OK