How can I change the Google Sheets background with CSS?

455 Views Asked by At

I want the grey area (in the red circle in my screenshot) to be #000, but I can't find a good selector for it.

Google Sheets screenshot

Currently, the background blinks red for less than a second and then turns grey. I painted another area green to be sure my Stylish Chrome extension is working.

#docs-chrome {
  background: green;
}

#docs-edit-container, #docs-editor, .grid-container {
  background: red !important;
}

Spent 20 minutes in Devtools. I just can't find it. The DOM of Google Sheets is pretty complex.

1

There are 1 best solutions below

2
Rocky On

If you want to color the whole thing, then try

    .goog-inline-block.grid4-inner-container{
         background-color:red;
    }

The entire sheet uses a single class to change color, there is just one color: white, even in the unused area controlled by grid4-inner-container