rafaelp / css_browser_selector

A very small javascript library that allows you to create browser specific CSS to be merged into your normal classes. No more hacks or mischievous code in your CSS code.
http://rafael.adm.br/css_browser_selector/
626 stars 168 forks source link

Chrome for android #29

Open toucan4267 opened 10 years ago

toucan4267 commented 10 years ago

I'm on a nexus 7 and using chrome for android. .android does not work while .chrome, .linux, and .chrome.linux work. I can't use these however or else chrome on ubuntu linux et all will be affected. Anyway to specifically target chrome for android? Here's the code: mozilla/5.0 (linux; android 4.4.2; nexus 7 build/kot49h) applewebkit/537.36 (khtml, like gecko) chrome/33.0.1750.136 safari/537.36

isarmstrong commented 9 years ago

The problem is the script sees Android & Chrome as separate entities. I suspect if you move the Chrome entry up to around line 46, after Firefox, it'll supersede Android. I haven't tested it yet though.

isarmstrong commented 9 years ago

Seems to work. Using Nexus 7 emulation I get:

class="webkit chrome chrome29 mobile linux js orientation_landscape maxw_768"