Add --lexxy-text-size variable and convert content font sizes to em - #1208
Open
lazaronixon wants to merge 2 commits into
Open
Add --lexxy-text-size variable and convert content font sizes to em#1208lazaronixon wants to merge 2 commits into
lazaronixon wants to merge 2 commits into
Conversation
Introduce a --lexxy-text-size variable as the base content font size and express heading and small-text sizes in em so they scale proportionally when the base is overridden. Sizes are preserved at the default 1rem.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces a configurable base typography scale for Lexxy content by adding a --lexxy-text-size CSS variable and switching content-relative font sizes (headings and “small” text) from rem to em, so they scale proportionally when the base is overridden.
Changes:
- Added
--lexxy-text-size(default1rem) and updated--lexxy-text-smallto0.875em. - Set
.lexxy-contentto usefont-size: var(--lexxy-text-size)as the base content size. - Converted
h1–h6font sizes fromremtoemto scale with the base.
Tip
If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| app/assets/stylesheets/lexxy-variables.css | Adds --lexxy-text-size and makes --lexxy-text-small relative (em) so derived sizes can scale with the content base. |
| app/assets/stylesheets/lexxy-content.css | Applies the base font size via --lexxy-text-size and converts heading sizes to em for proportional scaling. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
--lexxy-text-sizevariable (default1rem) as the base content font size, set on.lexxy-content.emso they scale proportionally with the base:h1 2em,h2 1.5em,h3 1.25em,h4 1em,h5 0.875em,h6 0.75em.--lexxy-text-smallvariable, replacing its usages with the literal0.875em.Computed sizes are identical to before at the default
1rem. Overriding--lexxy-text-sizenow scales all content text proportionally.