scottjehl / Device-Bugs

Just a collection of quirks and issues that occur on browser platforms (particularly those unlikely to update)
864 stars 19 forks source link

Android 4.1 and 4.2 don’t parse :nth-child(n) #69

Open zachleat opened 8 years ago

zachleat commented 8 years ago

:nth-child(n) works on Android 2.2 :nth-child(n) works on Android 2.3 :nth-child(n) fails on Android 4 (Kindle Fire HD 8.9) :nth-child(n) fails on Android 4.1 :nth-child(n) fails on Android 4.2 :nth-child(n) fails on Android 4.3 (Kindle Fire HDX 7) :nth-child(n) works on Android 4.3 (Galaxy Note 3) :nth-child(n) works on Android 4.4

Workaround:

:nth-child(1n) works on Android 4.1 :nth-child(1n) works on Android 4.2

Test case:

https://output.jsbin.com/besefig

MattDiMu commented 8 years ago

In case somebody doesn't want to think about it and uses postcss already: https://github.com/MattDiMu/postcss-nth-child-fix

...or use the corresponding postcss-fixes plugin pack, which tries to automatically fix such weird behaviors like that (just added it): https://github.com/MattDiMu/postcss-fixes