如何在Sanity Studio v3中导入自定义CSS

huangapple go评论56阅读模式
英文:

How to import custom CSS in Sanity Studio v3

问题

我想在Sanity Studio V3中进行一些小的CSS修改。

以前用于导入CSS的旧方法不再有效。

我该如何操作?

英文:

I would like to make a small CSS modification in Sanity Studio V3.

The old method to import CSS no longer works.

How can I do it?

答案1

得分: 2

这很简单,但文档中没有说明。

创建你的CSS文件。

在文件 sanity.config.ts 中,按如下方式导入你的文件:

import "./custom.css";

并测试是否能够使用一个简单的CSS语句:

* {
  color: red !important;
}

如果所有文本都变成红色,说明你的导入工作正常。

英文:

It is very simple but it's not in the doc.

Create your css file.

In the file sanity.config.ts, import your file as follows :

import "./custom.css";

And test whether it works with a simple CSS statement :

* {
  color: red !important;
}

If all the text is red, it means that your import works

huangapple
  • 本文由 发表于 2023年6月8日 16:13:45
  • 转载请务必保留本文链接:https://go.coder-hub.com/76429882.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定