Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Semantic UI font-size

  • This topic is empty.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • #168724
    Eli Wang
    Participant

    Hello everyone here!, I started learning semantic UI recently. All the font-size along with other spacing are defined in em and rem, to get the best scalability. Semantic UI leaves the font-size of the root element blank allowing the end developer to fill it in.

    However I found that setting font-size on the body element doesn’t affect the page at all. After one or two hours of struggling, I found that setting it on html actually does the work. semantic-ui.com sets body and html both as the default font-size. Not sure if it is for better compatibility.

    Though this pitfall is easy to avoid, can anyone explain this further? Any other things to pay attention to when setting default style? Is setting both html and body a best practice?

    Thanks!

Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.