# 使用主题覆盖 border-radius 变量

**URL:** <https://meta.discourse.org/t/override-border-radius-variables-with-theme/246574>\
**Category:** UX\
**Created:** [2022 年11 月 23 日 18:51 UTC](https://meta.discourse.org/t/override-border-radius-variables-with-theme/246574 "2022-11-23T18:51:56Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

作者： ![awesomerobot](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/awesomerobot/32/142900_2.png) [@awesomerobot](https://meta.discourse.org/u/awesomerobot)\
发布日期： [2022 年12 月 8 日 22:03 UTC](https://meta.discourse.org/t/override-border-radius-variables-with-theme/246574/10 "2022-12-08T22:03:41Z")

</div>

啊哈！非常感谢，我之前从未真正理解过它们为何重复，只是完全忽略了。

我已经将它们移到另一个文件中，这样就不会重复了，并且我已确认这解决了问题。

> <https://github.com/discourse/discourse/pull/19389>
>
> The variables in \`variables.scss\` are injected into all theme CSS files so the S…ASS variables are available. Doing this with CSS custom properties causes situations where they'll unintentionally override intentional overrides. 
> 
> Moving these to \`base.scss\` ensures they're only defined once, and can be overridden properly in themes. 
> 
> More details: https://meta.discourse.org/t/override-border-radius-variables-with-theme/246574/1

---

_[View the full topic](https://meta.discourse.org/t/override-border-radius-variables-with-theme/246574)._
