Skip to content

Add margin size, text justification and hyphenation to Theme settings#6320

Open
sensboston wants to merge 3 commits intowikimedia:mainfrom
sensboston:feature/margin-justify-settings
Open

Add margin size, text justification and hyphenation to Theme settings#6320
sensboston wants to merge 3 commits intowikimedia:mainfrom
sensboston:feature/margin-justify-settings

Conversation

@sensboston
Copy link
Copy Markdown

What does this do?

Adds three new user-facing options to the Reading Theme settings dialog:

  • Margin slider (0-10): Controls content width by overriding PCS default max-width via CSS
    injection. Default position (10) preserves current behavior.
  • Justify toggle: Enables text-align: justify for article content (default: on).
  • Hyphenation toggle: Enables CSS hyphens: auto for better line breaks (default: on).

Also blocks horizontal WebView scrolling when custom margins are active.

Why is this needed?

On tablets (e.g. Samsung Galaxy Tab S10+), the PCS default max-width leaves excessively wide
white margins on both sides of article content, reducing readability. Text justification and
hyphenation further improve the reading experience on wide screens.

These settings only take effect when users change them — default behavior is preserved for
existing users.

Includes translations for 18 languages.

https://phabricator.wikimedia.org/T417607

Here are some screenshots, from production and modified app:

Screenshot_20260217_010827_Wikipedia Dev
Screenshot_20260217_010743_Wikipedia

- Add margin slider (0-10) to Theme dialog for controlling content width
  by overriding PCS max-width constraints via CSS injection
- Add Justify and Hyphenation toggle switches
- Block horizontal WebView scrolling when custom margins are active
- Add translations for 18 languages

Bug: T417607
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant