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

Consider distributing a single set of stylesheets for all languages #165

Open
JayPanoz opened this issue Feb 26, 2025 · 0 comments
Open
Assignees
Labels
2024 Update New discussions, issues and requests triggered by the 2024 update Discussion feedback required

Comments

@JayPanoz
Copy link
Collaborator

JayPanoz commented Feb 26, 2025

At the moment, ReadiumCSS ships with different stylesheets for LTR+Latin, RTL, CJK, and CJK + vertical-writing. This means apps have to implement some logic to load the proper set of stylesheets, as described in the dist ReadMe.

While we initially decided to not go with CSS logical properties in April 2024 while rekindling the project for v2 (see issue #137), this choice may need to be revisited as it will simplify things quite a bit, although it’s a massive breaking change – we already have significant breaking changes though e.g. removing auto-pagination, page margins, etc.

What would it mean if we decide to attempt this?

  • replacing all physical properties with logical properties
  • using dir and lang when it is required to make things work – to be fair we’re already doing that in some modules
  • providing all user settings submodules in the single set, even if they should not apply to all languages, which results in a slightly heavier after stylesheet
  • a significant effort re. documentation – that may actually require more work than updating the CSS
  • extending the beta testing period by a fair bit, in order to make sure we did not create new bugs and issues
  • additional work for consumers who have already migrated to v2
  • updating support (see CanIUse)

The main benefits would be:

  • less complexity at the ReadiumCSS level, by removing modules specific to vertical-writing, and removing 3 variants of dist stylesheets, significantly reducing the codebase
  • less complexity at the apps’ injection level, since you don’t have to inject the correct variant based on conditions – although these conditions would remain for a handful of user settings
  • no filtering of user settings may eventually be a benefit as we’ve seen settings required for some variants that did not initially import them – app developers would not have to do a feature request here, but simply implement the setting
@JayPanoz JayPanoz added 2024 Update New discussions, issues and requests triggered by the 2024 update Discussion feedback required labels Feb 26, 2025
@JayPanoz JayPanoz self-assigned this Feb 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2024 Update New discussions, issues and requests triggered by the 2024 update Discussion feedback required
Projects
None yet
Development

No branches or pull requests

1 participant