The font size in the component should be calculated based on css custom variables #39300
Unanswered
ZhangChengLin
asked this question in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
All components involving font size (including h1-h6) should now be calculated and designed on the client (browser) through css custom variables (--bs-body-font-size) instead of writing specific value.
It should be done based on the following as base source
bootstrap/scss/_reboot.scss
Line 52 in bde23ae
bootstrap/dist/css/bootstrap.css
Line 199 in 344e912
Below are some specific local examples, without giving too many examples.
In addition, where em is used as the unit, I am not sure whether it needs to be changed.
bootstrap/dist/css/bootstrap.css
Lines 225 to 266 in 344e912
bootstrap/dist/css/bootstrap.css
Line 520 in 344e912
bootstrap/dist/css/bootstrap.css
Line 604 in 344e912
The reason is that when the basic font size becomes larger or smaller, the corresponding components should also change accordingly, so that it will not cause misalignment or display problems.
Generally, components do not change after being enlarged, because in the client, some sizes have been given specific values instead of subsequent calculation changes. Although this step will consume the resources of the client, it should not be changed frequently.
Beta Was this translation helpful? Give feedback.
All reactions