Times New Roman 的 CSS 值

Times New Roman 字体似乎比 Arial “小”,因此我想知道是否有推荐的方法可以更改为这种字体。我看到过 Change font sizes in your themes

我已经将 --font-family--heading-font-family 更改为 Times New Roman,但对字体大小有些疑问。

1 个赞

如果将其添加到主题的 common.scss 文件中,它应该会使所有字体大小增加 1px(我们的默认值为 15px)。

html {
    font-size: 16px;
    &.text-size-smallest {
      font-size: 14px;
    }
    &.text-size-smaller {
      font-size: 15px;
    }
    &.text-size-larger {
      font-size: 18px;
    }
    &.text-size-largest {
      font-size: 20px;
    }
  }

主要部分是

html {
  font-size: 16px;
}

而其他部分,例如 &.text-size-smallest,则用于调整用户偏好设置中的文本大小: https://meta.discourse.org/my/preferences/interface

3 个赞

太好了,谢谢! :slight_smile:

2 个赞

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.