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

Theming #73

Open
JayPanoz opened this issue Jan 22, 2020 · 0 comments
Open

Theming #73

JayPanoz opened this issue Jan 22, 2020 · 0 comments

Comments

@JayPanoz
Copy link
Collaborator

Following this issue in Swift and our engineering call, theming needs to be revisited.

To sum things up, ReadiumCSS prefs have been designed and built to allow theming from the start, meaning it already has most in place for common customisation e.g. the background-color and color variables.

A few presets e.g. modern, classic, etc. were made 2 years ago, but didn’t ship in Readium CSS alpha. They were simply built using several CSS variables e.g. I had something like:

{
  name: "classic",
  settings: {
    "--USER__appearance": "readium-default-on",
    "--USER__backgroundColor": "#FEFEFE",
    "--USER__textColor": "#121212",
    "--USER__textAlign": "justify",
    "--USER__bodyHyphens": "auto",
    "--USER__fontFamily": "var(--RS__oldStyleTf)",
    "--USER__fontSize": "100%",
    "--USER__typeScale": "1.125",
    "--USER__lineHeight": "1.5",
    "--USER__paraSpacing": "0",
    "--USER__paraIndent": "1rem",
    "--USER__wordSpacing": "0",      
    "--USER__letterSpacing": "0",
    "--USER__alignElements": "readium-center-elements"
  }
}

And it would go from

night

to this for instance:

modern

With custom spacing (margins), fonts, etc. the user can pick/modify and save.

So the idea is to make that clearer, and extend it if needed.

This also impacts readium/r2-navigator-swift#65 though, but is similar to another issue I’ll open shortly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant