06-05-2016, 05:53 PM | #1 |
Connoisseur
Posts: 89
Karma: 185923
Join Date: May 2015
Device: iPad 1/2/Air, K3/PW2/Fire1, Kobo Touch, Samsung Tab, Nook Color/Touch
|
K4iOS & Night Mode Media Queries
Okay, maybe I'll have more luck with this question than my last one
Anyone know how to target K4iOS with a media query? Specifically, I have some text that needs to be a certain shade of gray. It renders lighter on eInks, so I'm using some media queries to make it a different shade between Kindle eInks and Kindle Fires: Code:
/* Regular eInk Kindles get a very dark gray... */ .blah { color: #333333; } /* ...then, make it lighter for Kindle Fires */ @media screen and (device-aspect-ratio:1/1) { .blah { color: #666666; } } The text in question shows up as #333333 on K4iOS. I suppose that the ultra-hacky MQ I'm using there doesn't work, which shouldn't be surprising. So...how do I target K4iOS with an MQ? And, bonus question, anyone know of a way to target Night Mode in K4iOS (or Kindle Fire, too, actually) with an MQ or other selector? You can do it in iBooks... Cheers |
06-06-2016, 04:51 PM | #2 |
Connoisseur
Posts: 89
Karma: 185923
Join Date: May 2015
Device: iPad 1/2/Air, K3/PW2/Fire1, Kobo Touch, Samsung Tab, Nook Color/Touch
|
Re Kindle Night Mode CSS:
Funny, Aaron Troia asked the same thing here: if it's possible to target night mode with a media query or somesuch. After review, I don't think it's possible. In iBooks, Apple changes between Night/Sepia/Etc. by attaching a CSS class to the root document element. So you can actually detect when it changes and so on and adjust for it in your own CSS--which is awesome, until people get around to adopting the legitimate night-mode media query. (Although, what about sepia/half-night mode/any others? Something for the CSS standards body to think about...) |
06-06-2016, 08:48 PM | #3 |
Connoisseur
Posts: 89
Karma: 185923
Join Date: May 2015
Device: iPad 1/2/Air, K3/PW2/Fire1, Kobo Touch, Samsung Tab, Nook Color/Touch
|
(The conversation with myself continues!)
Re targeting K4iOS with a media query: I haven't been able to discover a media query that did this. K4iOS seems to answer exactly the same as Kindle e-Inks in all ways except screen dimensions. Rewind: In the Amazon Kindle Publishing Guidelines, it recommends that you set your default styles to apply to Kindle e-Inks, and then use the following media query to target Kindle Fires: @media screen and (device-aspect-ratio:1280/800) {...} Then, to target iPads, it recommends that you do a standard device-with query: @media (device-width: 768px) {...} Okay, so...does that work? Sure. But then you need to do media queries for all sizes of iPad and iPhone that exist. That's doable, but not a small set of queries. But then what about KDroid? There's no way you're going to set up media queries that will catch all the KDroid stuff. And what about on desktops? Hm... Idea:
This seems feasible because there's actually a fairly small list of Kindle eInks. What's that query going to look like? Code:
/* kindle 1/kindle 2/kindle DX, paperwhite portrait, paperwhite landscape, "other kindles" portrait, "other kindles" landscape, voyage portrait + oasis, voyage landscape */ @media amzn-mobi, amzn-kf8 and (device-height:1024px) and (device-width: 758px), amzn-kf8 and (device-height:758px) and (device-width:1024px), amzn-kf8 and (device-height: 800px) and (device-width: 600px), amzn-kf8 and (device-height: 600px) and (device-width: 800px), amzn-kf8 and (device-height: 1448px) and (device-width: 1072px), amzn-kf8 and (device-height: 1072px) and (device-width: 1448px) { p { ... } } Note: I haven't found media queries for the Kindle Oasis. If anyone has these device metrics please let me know so I can add them. I have tested this query on the following devices and it correctly detects them as e-Inks:
I tested the query on the following platforms and it correctly did not detect them as e-Inks:
Trying to get my hands on later generation Kindle Fires. I should also probably buy a Voyage... Anyway, this basically allows me to differentiate the e-Ink kindles from the rest of their brethren! Hooray. UPDATE: Added Oasis to the list of tested devices. 25-Jun-16 Last edited by mattmc; 06-25-2016 at 06:04 PM. |
06-08-2016, 08:15 PM | #4 | |
Bookmaker & Cat Slave
Posts: 11,493
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
If you develop it, AND IT WORKS, I'd love to see it. (Hell, for that matter, if you make any progress, and want some help, give me a ping, and we'll throw in some time on it too.) You probably noticed that I'd said something on Derek's post..wow, two YEARS ago? Sheesh. This is yeoman's work, Matt, the stuff you've done on the eINK MQs. Super, that. If I see something that will do the iOS trick, or we develop something, I'll return the favor, but nothing we've tried (I see that we have GMTA--Great Minds Think Alike--as we have a ton of overlap, on what you tried), has done it thus far. Hitch |
|
06-09-2016, 03:07 PM | #5 |
Grand Sorcerer
Posts: 6,721
Karma: 86234863
Join Date: Nov 2011
Location: Charlottesville, VA
Device: Kindles
|
I did a test using the Kindle Previewer 3 beta and found that having a media query with device-aspect-ratio, device-height, or device-width prevented the book from supporting enhanced typesetting. I don't know whether or not the same would hold true of a book sent through KDP. This could be a factor if you (or your customers) care about enhanced typesetting.
|
06-09-2016, 03:27 PM | #6 | |
Bookmaker & Cat Slave
Posts: 11,493
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
All humor aside--you saw this post-Previewer, right? The beta? And we don't know what might happen in the PW (Publishing Workflow). Warning--apparently, more "hands-on" work is indeed being done at the PW. So, now--yeah, wait for it--we can't be 100% positive what our books will look like (fonts, enhanced typesetting, etc.) until the accursed things are live. This isn't surmisal. It's confirmed. Hitch |
|
06-09-2016, 04:57 PM | #7 | |
Grand Sorcerer
Posts: 6,721
Karma: 86234863
Join Date: Nov 2011
Location: Charlottesville, VA
Device: Kindles
|
Quote:
Truth. |
|
06-09-2016, 09:39 PM | #8 |
Bookmaker & Cat Slave
Posts: 11,493
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
|
06-10-2016, 02:59 AM | #9 | |||
Connoisseur
Posts: 89
Karma: 185923
Join Date: May 2015
Device: iPad 1/2/Air, K3/PW2/Fire1, Kobo Touch, Samsung Tab, Nook Color/Touch
|
Quote:
Quote:
(And yes, I did see that post from you, hehe.) Nope, not a whit. Quote:
|
|||
06-10-2016, 05:52 PM | #10 |
Bookmaker & Cat Slave
Posts: 11,493
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
(n.b.: I'm not sure we're all down with the "enhanced typography," either. I know that I just am not wild about Bookerly. I mean, yawn much? Although, I confess, hyphenation possibilities would be loverly.)
Now, onto the question: I don't know WHY. I'm as perplexed and vexed as anyone, I assure you. We've all known for a long time that the PW occurs after "save and publish;" we've know that the SRL can change, when messed with in the PW. We know that other things, not discussed by the Zon, can/do/may change in the PW. (For example, the wee "leave us a review before you go" thing. Believe it or not, that's been applied SELECTIVELY for years now.) I can only surmise that something in this font's font characteristics--a descender, ascender, the metrics (weight, proportion, letter form, midline style, X-height, units above/below the baseline, internal leading...the truetype file structure, perhaps?...SOMETHING) doesn't play nicely with either KP or the other font. The font survived the first build (KG). It survived the 2nd (mobi then loaded at KDP). We sent the post-step-7 "Preview mobi" to the client, as previously, that's been ironclad. Baked in. Immutable. And now...it's not. And they've confirmed that this type of thing CAN CHANGE at the PW. And obviously, it's not being changed in any way that we want, not thus far. We now can't know. CAN'T know, not for sure, not before it's published. That part makes me ever so slightly nauseous, thinking about the repercussions. I can't imagine how this is going to play out. Not for us. I really can't. grrrrrrrrrrrrrrrrrrrrrrrrrrrrr rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr Hitch |
06-11-2016, 02:33 PM | #11 | |
Curmudgeon
Posts: 629
Karma: 1623086
Join Date: Jan 2012
Device: iPad, iPhone, Nook Simple Touch
|
Quote:
At this point, I think we need to send this thread and the embedded fonts thread to jeff@amazon.com. KDP's publishing workflow causing content breakage has been an ongoing problem for three years now. It is well past time to light a fire under someone's you-know-what. As a publisher, when I deliver content, I expect my customers to get precisely what I delivered to the content distributor. If Amazon's publishing workflow makes further changes (beyond trivial stuff like inserting a review page at the end or changing the start-reading marker), then our entire QA process becomes a waste of time and effort. No other content distributor makes radical, content-altering changes to content during their ingest. That's just not acceptable in a delivery partner. |
|
06-11-2016, 05:45 PM | #12 | |||
Bookmaker & Cat Slave
Posts: 11,493
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
IME, they are highly responsive to author/publisher complaints (this may be your bailiwick, DAG!), and not to working slobs like me. I'm an afterthought, if you think about it...I'm no more important than the cover designer. Hell, less. I don't make them MONEY. Publishers like you, do. I know that every author client of mine, that has reached out to them for this, or that, or the next thing, seems to get fixed damn skippy. Me? To quote The Wire, "Sheeeeeeeeeeeeeeeiiiiiiiiiittttttttt." Of course, it's also true that by the time I email them, whatever it is is some big-ass issue, that isn't easy to fix (or, hell, we'd have fixed it), OR, we've developed a workaround (hello, fonts!). So...they likely don't have the same impetus to help me...more of a "formatter, heal thyself" mindset, I suspect. Spoiler:
Quote:
Quote:
I could email him, sure, but I genuinely don't expect anything other than, MAYBE, a form letter in return. Maybe we should have a contest and a poll: we all send it, and see WHO gets the return email, if anyone? Or who waits the longest, or...? (Lemonade from lemons, boys and girls). That's my take. Hitch |
|||
06-13-2016, 12:52 PM | #13 | |
Curmudgeon
Posts: 629
Karma: 1623086
Join Date: Jan 2012
Device: iPad, iPhone, Nook Simple Touch
|
Quote:
I mean yes, pedantically, what they deliver is not a checksum-identical copy of the book, and I wish it were, because it would make certain things easier. But that doesn't really compare with chopping out chunks of your stylesheet arbitrarily.... |
|
06-14-2016, 01:49 AM | #14 | |
Bookmaker & Cat Slave
Posts: 11,493
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
Yeah. It's new and different. It boggles me, and I'm trying to drill-down, to see if I can find out what's what. Hitch |
|
06-21-2016, 11:00 PM | #15 | ||
Connoisseur
Posts: 89
Karma: 185923
Join Date: May 2015
Device: iPad 1/2/Air, K3/PW2/Fire1, Kobo Touch, Samsung Tab, Nook Color/Touch
|
Quote:
Yes, the Mighty Goog is omniscient. But I don't think you have to worry about Goog-wielding thought police :P Quote:
To me, that's actually far worse than stripping out your embedded fonts. |
||
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Media Queries for images as dropcaps in Kindle DX | verydeepwater | Kindle Formats | 3 | 03-22-2014 05:35 PM |
Media Queries | eggheadbooks1 | Kindle Formats | 4 | 12-16-2013 02:32 AM |
Epub to mobi not recognizing media queries | srascal | Conversion | 2 | 03-25-2013 05:19 PM |
Calibre and Media Queries | chrlsdrwn12 | Calibre | 0 | 12-05-2012 11:16 AM |
Media Queries on Kindle Previewer | AIR-WIZZ | Kindle Developer's Corner | 26 | 10-15-2012 10:10 AM |