Skip to content

Default values in px and zoom are conflicting #206

@qnga

Description

@qnga

Describe the bug

Some Readium CSS variables have default values in px in case they're not set. This is the case, for instance, of --RS__defaultLineLength. As this property is translated into a CSS property whose values must be in the zoomed coordinated system, setting a --USER__fontSize different of 1 leads to inconsistent (and bad) effective values.

How to reproduce?

  1. Use the scroll mode.
  2. Do not set --RS__defaultLineLength or --USER__lineLength so that the default value applies.
  3. Change --USER__fontSize to 0.1. If your viewport is large enough, you'll see margins far bigger than with --USER__fontSize == 1 because line length is limited to 640px in the zoomed coordinate system instead of the original one.

Readium CSS version

2.0.0-beta.13

Platforms

Android

Browsers

Android System WebView

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions