Mobileread
Different styles for landscape and portrait?
#1  lektor 09-25-2019, 08:40 AM
Hi, I am using and enjoying KoReader on my Kobo Forma and have tweaked many settings to get a great experience. There's just one thing on my wish list I haven't been able to figure out.

I like to switch between landscape and portrait frequently. I find one or the other more comfortable depending on how I'm sitting/lying, and sometimes I just like to switch to stop one position getting cramped.

I'd love to be able to automatically switch styles when I rotate, to either:
a) increase the margins on landscape, so the line-length stays similar to portrait, OR
b) decrease the font-size on landscape and take advantage of the two-column layout

Is it possible? I know how to do this in css using @media (orientation: landscape), but my attempts to do this through a styletweak css (or epub.css) have not been successful.
Reply 

#2  NiLuJe 09-25-2019, 11:35 AM
There's a PR open for a profile system to keep specific settings around. I would assume that would help with stuff like that.
Reply 

#3  lektor 09-27-2019, 07:28 AM
Quote NiLuJe
There's a PR open for a profile system to keep specific settings around. I would assume that would help with stuff like that.
Thank you. I guess it's more trying to figure out a way to make the styles dynamically respond to a change in orientation. Media queries don't seem to work, I guess because CSS3 isn't supported. I tried using 'vw' instead of % or px, but that doesn't seem supported either.

Anyway very much a niche use case and still very happy with KoReader!
Reply 

#4  Frenzie 09-27-2019, 08:05 AM
Quote lektor
I guess because CSS3 isn't supported.
Sure it is, just not various modules/parts of it. :-P Firefox didn't really support media queries until many years after I very enthusiastically started adopting them in Opera in 2005.

Ereaders are a lot more uniform than browser windows; tbh I would expect you to read EPUBs either in landscape or in portrait without switching between the two but it's certainly an interesting question.

Doesn't specifying the margin in % work? It wouldn't be as dynamic but 10 % in landscape would still be many more pixels than in portrait.
Reply 

Today's Posts | Search this Thread | Login | Register