Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Line Height and Justification do not apply to some books #1332

Open
kaptem opened this issue Jun 3, 2024 · 1 comment
Open

Line Height and Justification do not apply to some books #1332

kaptem opened this issue Jun 3, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@kaptem
Copy link

kaptem commented Jun 3, 2024

Describe the bug
The foliate settings for line height and justification do not apply to some booys.

Expected behavior
For the Foliate settings to always apply or for a toggle to force the Foliate settings for line height and justification onto a book.
Version:

  • Foliate version: Arch
  • OS/Distribution and version: [e.g. Ubuntu 18.04]
  • Desktop environment: [e.g. GNOME 3.36] KDE
  • Installation method: Arch Repo's
@kaptem kaptem added the bug Something isn't working label Jun 3, 2024
@johnfactotum
Copy link
Owner

Currently you can already force any style you'd like using the user stylesheet.

What remains is whether to force things by default and how to make it optional. It would be possible to add these option in the settings, but then there's the question of whether to present them as separate options, or to bundle them together in a single "override publisher style" sort of option.

Always forcing justification by default is absolutely out of the question. In my opinion it breaks too many things to even be an optional setting.

Forcing line-height by default might be tolerable. It's perhaps okay and in fact somewhat necessary when forcing the font. The problem here is how exactly to force it. Maybe just use !important for p, li and dd, but that might not be enough for some books. (Not sure about blockquote even though currently it does set it [without !important but ordered at the end of non-inline styles]. Perhaps only apply it to blockquotes containing only phrasing content, like blockquote:not(:has(p, h1, h2, h3, h4, h5, h6, header, hgroup, section, article, aside, div)) but that seems a bit heavy.)

So here's one tentative solution:

  • For line-height, make the "override publisher font" setting also control whether line-height is overridden. It might be good to put the line-height setting close to the font settings.
  • For justification, do nothing. Keep the current behavior and never force it. And maybe clarify this by changing the title "Paragraph" to "Default paragraph style" or something similar.

Some alternatives:

  • Provide a separate option for forcing individual settings. Though in conception a simple solution, I'd very much like to avoid this option-geddon if possible.
  • Provide an option similar to the browser's reader mode where everything is overridden. One problem with this approach is that it might require reloading the page to take effect.
  • Do nothing. Just use the user stylesheet or edit the books.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants