Skip to content
This repository has been archived by the owner on Jul 29, 2022. It is now read-only.

Simplify Readium CSS injection and remove injection of the default stylesheet #107

Merged
merged 4 commits into from
Jun 2, 2020

Conversation

mickael-menu
Copy link
Member

Partially address this issue by removing the injection of the default stylesheet altogether, until we add a heuristic to determine if a publication has styles.

Remove injection of Readium's default stylesheet
Simplify serving files from the application's assets
import java.util.*

class Server(port: Int) : AbstractServer(port)
class Server(port: Int, context: Context) : AbstractServer(port, context.applicationContext)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a breaking change, isn't it?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but a necessary one unfortunately. We need the Context to access assets which used to be passed to each injection API. I think it's cleaner that way.

Also the migration will be pretty straightforward in reading apps, the compiler will crash on the missing context.

@mickael-menu mickael-menu merged commit 67139dd into develop Jun 2, 2020
@mickael-menu mickael-menu deleted the fix/upgrade-readium-css branch June 2, 2020 06:41
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants