Skip to content

Instantly share code, notes, and snippets.

@dvschultz
Created January 8, 2014 21:26
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dvschultz/8324974 to your computer and use it in GitHub Desktop.
Save dvschultz/8324974 to your computer and use it in GitHub Desktop.
Media Queries: Kindle Fire vs Kindle e-ink.
@media screen and (device-aspect-ratio:1/1) {
/* anything in here will work on Fires. Seriously. */
}
@media not all and (device-aspect-ratio:1/1) {
/* anything in here will work on e-inks */
}
@dvschultz
Copy link
Author

This is the hackiest media query ever, but it does (currently) work. I maybe wouldn’t recommend using this unless you plan to keep an eye on device specs every time they release a new device. AND then you’d have to re-submit all of your titles.

@dvschultz
Copy link
Author

so far this has been tested on the following:

  • Kindle Paperwhite (2nd Gen)
  • 4th Gen Kindle
  • Late 2012 Kindle Fire HD 7
  • Late 2013 Kindle Fire HD 7

@dvschultz
Copy link
Author

the dumbest thing about this media query is that the Fire doesn’t care what value is assigned to device-aspect-ratio. you could do 1024/800, 19/6,1/1, 50/50. You can’t however just give it a number (say, like 1.6).

@tooolbox
Copy link

@dvschultz Any idea if this still works? :)

@tooolbox
Copy link

tooolbox commented Jun 5, 2016

This does still work AFAICT, tested it on a 1st gen Kindle Fire vs. a 2nd gen Kindle Paperwhite.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment