# 如何更改 h3 类别的字体大小？

**URL:** <https://meta.discourse.org/t/how-to-change-category-h3-font-size/100587>\
**Category:** Support\
**Created:** [2018年十月26日 21:20 UTC](https://meta.discourse.org/t/how-to-change-category-h3-font-size/100587 "2018-10-26T21:20:58Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Johani](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/johani/32/176920_2.png) [@Johani](https://meta.discourse.org/u/Johani)\
**Post date:** [2018年十月27日 04:05 UTC](https://meta.discourse.org/t/how-to-change-category-h3-font-size/100587/2 "2018-10-27T04:05:15Z")

</div>

Your changes are not applied because the selector in the `categories-list.scss` file is more [specific](https://developer.mozilla.org/en-US/docs/Web/CSS/Specificity). If you want your styles to apply, you need to change your selector so that it either has the same specificity or higher.

Try this instead:

```plaintext
.category-list tbody .category h3 {
  font-size: $font-up-3;
  line-height: $line-height-medium;
  font-family: Calibre-Regular, Helvetica, Arial, sans-serif;
}

```

Also as a side note, if you want to use the font-size variables, you don’t actually need to add all of these to your theme:

```plaintext
$font-up-6: 2.296em;
$font-up-5: 2em;
$font-up-4: 1.7511em;
$font-up-3: 1.5157em;
$font-up-2: 1.3195em;
$font-up-1: 1.1487em; // 2^(1/5)
$font-0: 1em;
$font-down-1: 0.8706em; // 2^(-1/5)
$font-down-2: 0.7579em; // Smallest size we use based on the 1em base
$font-down-3: 0.6599em;
$font-down-4: 0.5745em;
$font-down-5: 0.5em;
$font-down-6: 0.4355em;

// Common line-heights
$line-height-small: 1;
$line-height-medium: 1.2; // Headings or large text
$line-height-large: 1.4; // Normal or small text

```

You only need to add this:

```plaintext
@import "common/foundation/variables";

```

and all the [variables](https://meta.discourse.org/t/how-to-use-discourse-core-variables-in-your-theme/77551) (including font-size) should be available for you to use.

---

_[View the full topic](https://meta.discourse.org/t/how-to-change-category-h3-font-size/100587)._
