We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I want to use $doc-font-size to scale all text in the theme, but the html style in _reset.scss is overriding my change.
$doc-font-size
html
_reset.scss
Changing $doc-font-size should alter font sizes globally. It does not.
Go to _variables.scss and change $doc-font-size, then observe the effect on the text in a post.
_variables.scss
It's pretty clear what is happening here.
All of the type scaling variables are based on em sizes, which are set by the most recent absolute font size setting. In _reset.scss we have this:
em
html { /* apply a natural box layout model to all elements */ box-sizing: border-box; background-color: $background-color; font-size: 16px; @include breakpoint($medium) { font-size: 18px; } @include breakpoint($large) { font-size: 20px; } @include breakpoint($x-large) { font-size: 22px; } -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; }
So the scaling basis will always be 16, 18, 20, or 22px, no matter what is set in the SCSS variables.
The text was updated successfully, but these errors were encountered:
I resolved this by adding the following to assets/css/main.scss:
assets/css/main.scss
html { /* apply a natural box layout model to all elements */ box-sizing: border-box; background-color: $background-color; font-size: $doc-font-size * 1px; @include breakpoint($medium) { font-size: $doc-font-size * 1.125px; } @include breakpoint($large) { font-size: $doc-font-size * 1.25px; } @include breakpoint($x-large) { font-size: $doc-font-size * 1.375px; } -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; }
Sorry, something went wrong.
6be43f7
No branches or pull requests
Theme version and system environment
What happened?
I want to use
$doc-font-size
to scale all text in the theme, but thehtml
style in_reset.scss
is overriding my change.Expected behavior
Changing
$doc-font-size
should alter font sizes globally. It does not.Steps to reproduce the behavior
Go to
_variables.scss
and change$doc-font-size
, then observe the effect on the text in a post.Other
It's pretty clear what is happening here.
All of the type scaling variables are based on
em
sizes, which are set by the most recent absolute font size setting. In_reset.scss
we have this:So the scaling basis will always be 16, 18, 20, or 22px, no matter what is set in the SCSS variables.
The text was updated successfully, but these errors were encountered: