Replace font-size absolute units with relative units#943
Merged
mlinksva merged 1 commit intogithub:gh-pagesfrom Feb 23, 2022
aisgbnok:904-realtive-font-units
Merged
Replace font-size absolute units with relative units#943mlinksva merged 1 commit intogithub:gh-pagesfrom aisgbnok:904-realtive-font-units
mlinksva merged 1 commit intogithub:gh-pagesfrom
aisgbnok:904-realtive-font-units
Conversation
Contributor
|
Thanks @aisgbnok! At a glance the rendered version of this looks good to me. Further improvements or fixes welcome if needed. |
Contributor
|
(The CI failure is due to an unrelated broken link, will address separately.) |
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
I noticed #904 and thought I would attempt to resolve it. I believe I translated all
font-sizeCSS properties frompxtorem, in theapplication.cssfile.If your browser is at the default font settings you should see no change in font size, and the site will look identical. If you modify your browser's font size you will now see the site's font size scale accordingly.
REM
Web browsers calculate REM from the root element size. By default, modern web browsers use
16px = 1rem. Therefore I performedpx/16 = rem.Rem is a relative unit meaning it is adjustable by the browser or by modifying the root element in CSS. As an example, if a user changes their browser's default font size then rem will increase/decrease accordingly. Therefore this change improves user accessibility.
Mozzila Documentation on CSS values and units.
WC3/WAI - Draft Tutorial