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

Add page text width option, and split margins #149

Merged
merged 4 commits into from
Feb 13, 2021
Merged

Conversation

mikejzx
Copy link
Contributor

@mikejzx mikejzx commented Feb 13, 2021

The main feature of this PR is a new 'maximum text width' option, which helps enhance readability and makes kristall look a lot nicer! This feature should also work with most HTML pages fine

Example with default 900px width:
image

See 4eefb7d for implementation details of how this was done

The old layout is still available via a preference.

Additionally, the margins have been split into two preferences now; 'left/right', (horizontal) and 'top/bottom' (vertical). When using maximum text width as shown above, the horizontal margin is used when the window is smaller than the configured text width:
image
(note the 55px margin between the text and window edge)

Closes #91
Closes #44

Mike Skec added 4 commits February 13, 2021 12:48
Hard-coded values for now. This works by setting the left/right margins of the page dynamically (e.g on window resize). The margins are calculated to limit the text's width between a value. If the window width is less than this text width, the text fill width is the same width as the page, the margins in this case will be the user's configured margins (not yet implemented).
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

Successfully merging this pull request may close these issues.

Alternative page layout Suggestion: Separate settings for horizontal and vertical page margins
2 participants