如何自动添加 `!important`
作者: MICAHFANG创建于 2023年7月10日更新于 2023年7月10日
你好, 我在项目中使用了 `@stitches/react`,在某些情况下,我需要使用 `cleanslate`(一种高级的 CSS 重置工具)。但是这个工具需要在每个属性的末尾添加 `!important` 来覆盖其自身样式。目前,我只能手动在每个属性的末尾添加 `!important`。有没有什么方法可以自动在每一行后添加 `!important`?像 `postcss` 这样的其他工具有插件可以实现这些功能。但是我在 stitches 中找不到任何方法。
内容来源: stitchesjs/stitches