|
|
#1 |
|
Fanatic
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 559
Karma: 65460
Join Date: Jun 2011
Device: Kindle Voyage, Boox Go 7
|
CSS compatibility width: fit-content
Is there any chance of getting KOReader to accept the width: fit-content property/value?
|
|
|
|
|
|
#2 |
|
Fanatic
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 559
Karma: 65460
Join Date: Jun 2011
Device: Kindle Voyage, Boox Go 7
|
Nothing?
I'm really struggling to understand what CSS elements and properties are compatible with KOReader, and why. I have yet to find a program that reliably gives the user as much control over his/her reading experience as KOReader, but the advanced CSS formatting that it interprets versus that which it ignores is a black box. I understand (and, frankly, align with) the reticence to make KOReader integrate the multimedia elements of ePub3 design, but I am left puzzled by what appears to be an abitrary implementation of modern HTML formatting. Is there at least any sort of reference guide for what works in KOReader and what doesn't? And what (if any) additional HTML/CSS functionalities are likely to be incorporated? |
|
|
|
| Advert | |
|
|
|
|
#3 | ||
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,819
Karma: 731691
Join Date: Oct 2014
Location: Antwerp
Device: Kobo Aura H2O, Kobo Libra 2
|
https://wiki.mozilla.org/QA/Minimal_Test_Cases
fit-content is already supported, so without a minimal testcase there isn't really anything to say. Quote:
![]() Quote:
As for what would be added, basically whatever piques someone's interest. Doing preparatory work like providing minimal testcases increases the pique factor. |
||
|
|
|
|
|
#4 | |
|
Fanatic
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 559
Karma: 65460
Join Date: Jun 2011
Device: Kindle Voyage, Boox Go 7
|
Quote:
The goal is to have a block of text that is centered in the page but with its contents variably aligned within that block, and constrained by the width of its contents [see FitContentCORRECT.jpg]. Unfortunately, in KOReader, it seems to be ignoring the fit-content value and occupying the full width of the screen (excluding the 5% L/R padding). [see FitContentWRONG.jpg] Last edited by ElMiko; 04-17-2026 at 08:46 AM. |
|
|
|
|
|
|
#5 |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,819
Karma: 731691
Join Date: Oct 2014
Location: Antwerp
Device: Kobo Aura H2O, Kobo Libra 2
|
It looks like the "correct" screenshot for me. You're most likely using an old version or you've changed some render setting.
|
|
|
|
| Advert | |
|
|
|
|
#6 | |
|
Fanatic
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 559
Karma: 65460
Join Date: Jun 2011
Device: Kindle Voyage, Boox Go 7
|
Quote:
I updated and now am getting something similar to what your seeing, but it's still not actually "fitting to content". As you can see from your screenshot, the lines are breaking when they shouldn't be—the "padding" is way more than 5% on either side. EDIT: I think I see what's happening... It's applying the padding after the fit-content, so the content will always render as less than its full width. Presumably, setting the padding to zero and wrapping the whole element in a div with 5% L/R margins will get around this, right? EDIT2: Okay, so there are two approaches here that would work, I think. One is the div wrap, which would be most useful with absolute value margins (e.g. 2em). The other is a max width property within the blockquote itself, which would be most useful for relative boundaries. Last edited by ElMiko; Today at 11:03 AM. |
|
|
|
|
|
|
#7 |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,819
Karma: 731691
Join Date: Oct 2014
Location: Antwerp
Device: Kobo Aura H2O, Kobo Libra 2
|
|
|
|
|
![]() |
| Thread Tools | Search this Thread |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| css if img aspect-ratio >1/1 width:100%, otherwise width:50% | rjwse@aol.com | Editor | 0 | 03-19-2021 07:41 AM |
| fit a image to the width of screen | leescott | ePub | 7 | 07-23-2015 10:39 AM |
| K3 - Fit to screen (width) for PDF | nuke | Amazon Kindle | 0 | 09-30-2010 09:27 AM |
| How to center/fit page width SVG images with <OBJECT> | amoroso | ePub | 0 | 07-31-2010 11:48 AM |
| PRS-600 How to make prs600 display PDF fit width? | wifish | Sony Reader | 1 | 12-20-2009 12:28 PM |