How to change default cell selection color?

Tags: #<Tag:0x00007efc656cfbe8>

Is there a css class where I can change the default selection color for cells?
image

Hi @mhennessy7

there is no className within the API, but you can overwrite the defaults. Here’s a demo https://jsfiddle.net/handsoncode/ofce4hk5/

CSS

.wtBorder.current,
.wtBorder.area {
  border-color: pink !important;
}

Thanks, that’s what I was looking for, however, it’s not working for me?
I’m using the React version, not sure if that makes a difference?

I have made other changes in our index.scss file to override other handsontable styles which work fine, but for some reason this one isn’t. Does it need to be under the .handsontable

Hi @mhennessy7

Sorry. That’s my bad. I wanted to reply to you as soon as possible and made a silly mistake.

The demo uses background-color, but post content mentioned border-color. Please test the background-color.

Updated React demo https://jsfiddle.net/handsoncode/54aqpz09/

That worked… Thx!

1 Like