I am specifically asking about the answer provided here

We have many projects which have community implementations. As it is well known that communities tend to have their own themes and styles, the tables in communities are also required to follow same theme/styles/color-combination. The table cells can be formatted using custom components.

But there seems to be absolutely no way to modify appearance of header cells. So, we are currently overriding styles of header cells using static resource js files. But we are obviously worried as this is not documented.

Its given in documentation that they are still Working Draft, so:

  1. Is it possible to know when will ::part or ::theme be available as GA in browser and LWC components?
  2. When they become available, which parts of lightning-datatable be available for overriding styles? and specifically, will header cells be marked for overriding?
  3. Is there any problem with overriding styles with static resource js files?
  • Interesting question. In the near-term, I'd suggest not using a JS static resource hack but instead do the "clean" thing and implement your own extended data table using the SLDS blueprints. Yeah, a big faff but at least you know it is not going to be pulled from under your feet. And you can decide how flexible styling will be.
    – Phil W
    Commented Jun 10, 2020 at 15:29
  • @PhilW The slds-blueprints lacks functionality and its quite complicated to implement column resize, inline editing etc. We want to take advantage of extending standard component so that we need not worry about regular upgrades. Commented Jun 10, 2020 at 15:33
  • Agreed, but this could easily be a) years away and b) done so that the standard component doesn't actually expose the parts you want to style.
    – Phil W
    Commented Jun 10, 2020 at 15:44
  • @PhilW Yea, thats what I worry about, but many components been implemented that way already before I came to know Commented Jun 10, 2020 at 15:48


You must log in to answer this question.