Home>
I personally wrote something inhtml
orbody
until now, but when I looked at Bootstrap, it was as follows.
html {
font-family: sans-serif;
...
}
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol "," Noto Color Emoji ";
...
}
Questions
・ Why don't you specify the contents offont-family
directly inhtml
・ The reason whyhtml
andbody
are different
It seems to be listed in Normalize, and the remnant? I thought, but I couldn't understand it even after examining it.
Changed commits are https://github.com/twbs/ It looks like bootstrap/commit/4fa7749442ea7ab609d1c8c25dc4ba750194e542 .
If i know why i am writing in a strange way, please let me know.
-
Answer # 1
Related articles
- css - bootstrap is not reflected in aws production environment
- css - bootstrap does not close hamburger menu
- Bootstrap CSS usage
- Bootstrap CSS layout list
- bootstrap css style form
- How to use CSS in Bootstrap
- css, bootstrap i want to eliminate the gap on the right
- css - hamburger menu in bootstrap nav bar does not align right
- css - i want to add bootstrap color
- bootstrap css i want to put the panel title in the center and the icon on the right edge
- css rails bootstrap buttons are not centered
- how to customize with your own css when using bootstrap 4
- css - media queries don't work in bootstrap
- css - i am having trouble because bootstrap is not displayed as it is
- css - bootstrap vertical/center alignment does not work
- css - the logo is distorted in the navigation bar using bootstrap
- css - i want the links in the bootstrap list to look like buttons
- css - want to introduce material design bootstrap in rails
- css - drupal8 theme editing (bootstrap 8x-323 (default theme))
- css - want to unify the height with the bootstrap card
Related questions
- css : Bootstrap different width on phone and computer
- php - i want to hide the token = ~~~ that is displayed in the url when i insert the @csrf code in laravel8
- html - i want to put an image with bootstrap
- javascript - [rails] css and js do not respond when material-dashboard is installed
- css - i want to arrange card elements using bootstap side by side and evenly spaced
- html - [airbnb replication] the image does not fill the width (when compatible with smartphone version lesbian)
- html - bootstrap card does not adapt well
- php - i want to disable responsive support in the header part, but i can't
- html - i can't center the input form in django
- bootstrap css file not loaded
The two questions in the question text seem to arise from the above questions. The
font-family
property of thehtml
element remains because some styles were moved from normalize.css as they were when moving from normalize.css to Reboot It is only If thehtml
element's child elements are the onlybody
elements, this is aapparently meaningless descriptionAnd thefont-family
property of thehtml
element will beremoved as a redundant description.In order to adjust the default root font size by adjusting the browser settings, Bootstrap does not specify the
html
element font size, andbody
font-size: 1rem
is specified for the element. Therefore, instead of specifying thefont-family
property in thehtml
element, set thefont-*
property or global property tobodyelement. From the background, the
font-family
property is not ahtml
element, but abody
element. Isn't it specified?As I wrote at the beginning, one of these styles was just moved from normalize.css (not actually used), and the other was actually used by Bootstrap. It ’s natural that you are out of sync.
Reference:
Reboot&Type cleanup by MartijnCuppens · Pull Request # 28698 · twbs/bootstrap · GitHub
Reboot · Bootstrap
Typography · Bootstrap
GitHub-twbs/rfs: ✩✩✩ Automates responsive resizing ✩✩✩