scania-digital-design-system / tegel

Tegel Design System
https://tegel.scania.com
MIT License
17 stars 13 forks source link

[Feature Request]: Inject custom CSS into expandable rows #664

Closed former-self closed 1 month ago

former-self commented 3 months ago

Requirements before reporting

Type of feature request

Functionality

What is your feature request?

tds-body-row-expandable elements should be able to be styled like the normal tds-body-row elements.

Here's an attempt at styling a table with mixed normal and expandable rows, and as you can see nothing happens with the expandable ones: image

Background

Colour is a great tool to highlight significant information in larger tables and the expandable rows are great to let the user be able to see more information about why the data is highlighted without clutter.

Idea

Adding a "part" attribute to the tr elements would allow easy styling of expandable rows through the ::part() selector (CSS Shadow Parts)

Goals and objectives

If expandable rows can be styled with just CSS it would be a success.

If something like this could work I'd be happy. Of course there might be other just as simple solutions and they would be fine too. tds-body-row.red, tds-body-row-expandable.red::part(row) { background-color: red; }

Timeline

No response

Resources

No response

Contact information

alexander.powell@scania.com

theJohnnyMe commented 2 months ago

The fix is to be released next week.

theJohnnyMe commented 1 month ago

Fix is released is version 1.13.0