0

I am attempting to change the styling of Sanity Studio as noted here in the docs: https://www.sanity.io/docs/styling#d7f9b5cc2adb

As such, I have created a file with the following css variables:

@import "part:@sanity/base/theme/variables/gray-colors-style";

:root {
  --fieldset-border: none;
  --fieldset-bg: var(--gray-darker);
}

Now, this works as I want for --fieldset-border, but it does not work for --fieldset-bg. I even tried hard-coding the value of --fieldset-bg as follows: --fieldset-bg: #454545; -- it still did not work.

So, I am wondering, why does --fieldset-border work and --fieldset-bg not work. More importantly, what do I have to do so that I can change the background color of fieldsets in sanity studio?

Moshe
  • 6,011
  • 16
  • 60
  • 112

1 Answers1

0

I have a hunch that the specific --fieldset-bg variable got silently deprecated recently (the move from @sanity/components to @sanity/ui). IF that's the case, opening a bug report issue in sanity-io/sanity repository would be great!

Regardless if that's the case, I'd suggest overwriting the css with a global selector in your variableOverrides.css file:

div[class^="DefaultFieldset_root"] {
  background: papayawhip;
}

Hope this helps

Henrique Doro
  • 436
  • 4
  • 7