vincjo / svelte-simple-datatables

A Datatable component for Svelte

Home Page:https://vincjo.fr/svelte-simple-datatables

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to apply styles to component

ProphetLamb opened this issue · comments

Thanks for the easy-to-use control. I have been trying to integrate the control with a style manager, but had limited success so far:

much styles

After attempting a few elegant solutions, such as specifying the background-color and similar properties targeting <Datatable class="themed-datatable" using the custom style themed-datatable which specifies background-color (the normal way of styling) I gave up. Nothing could change the background or borders.

So I resorted to the bad :global(*) selector in order to theme any thing at all. This is what you can see in the screenshot above.

  :global(*) {
    background-color: var(--theme-colors-background, initial);
    border-bottom: var(--theme-colors-background-contrast, initial);
  }

I remain unable to theme certain elements because of the following nasty class .css that I cannot overwrite.

image

CSS is not my daily bread and butter, so I might be missing something obvious. Any suggestions on how I can get the component themed?

Thanks in advance. Cheers!