grid icon indicating copy to clipboard operation
grid copied to clipboard

Feature request: alternating row background color

Open universallyleo opened this issue 10 months ago • 2 comments

Please enlighten me if currently there is any workaround for having rows in alternating background color!

universallyleo avatar Jan 31 '26 06:01 universallyleo

Hello @universallyleo , To customize the default styles please use rowStyle property.

Here is the example: https://stackblitz.com/edit/sveltejs-kit-template-default-e8r1phug?file=src%2Froutes%2FMyGrid.svelte

Natasha-eng avatar Feb 02 '26 11:02 Natasha-eng

Thank you for pointing this out, I then tried setting rowStyle, which does work other styles (e.g. text color) apart from background color. After some inspection, it turns out that I have to change --wx-background in .wx-row instead, so the following work for me.

	:global(.wx-row:nth-child(even)) {
		--wx-background: hsl(0, 0%, 97%);
	}

universallyleo avatar Feb 02 '26 16:02 universallyleo