You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DataTable (and @carbon/ibm-products' Datagrid) support adding slugs to column headers and rows. It's shown in Storybook as an "AI label".
However, we are using it to insert an info tooltip in the column headers:
For the AI label, Carbon inserts a blue gradient in the data cells, and the blue bar at the top:
However, we don't want that styling (since our info tooltip is unrelated to AI):
Since we don't want that styling, I need to override Carbon's styling. But this is not trivial, because DataTable has styling for selected rows, hovered rows, hovered + selected rows, child rows, etc. This is what worked for me but it's not complete:
// Override the top blue line and background gradient that Carbon applies to <th> and <td> with slugs (i.e.
// the headers and cells in columns where we have the (i) icon). We don't want any special styling there.
th {
background: themes.$layer-accent !important;
box-shadow: none !important;
}
td {
background: themes.$layer !important;
}
:global(.#{prefixes.$carbon}--data-table--selected) td {
background: themes.$layer-selected !important;
}
tr:hover > td {
background: themes.$layer-hover !important;
}
.#{prefixes.$carbon}--data-table--selected:hover > td {
background: themes.$layer-selected-hover !important;
}
The solution
I'm wondering if you could make all the blue styling optional, i.e. opt-in, since it would be easier to enable rather than to have to override the Carbon styling. Something maybe like
Thank you for submitting a feature request. Your proposal is open and will soon be triaged by the Carbon team.
If your proposal is accepted and the Carbon team has bandwidth they will take on the issue, or else request you or other volunteers from the community to work on this issue.
@wkeese To make a change to styling, I suggest you bring to up with Adam Cutler and/or Ramiro Galan. We are following a very specific AI implementation from their work across all product team. There aren't supposed to changes without review and approval by them. They do host a weekly call every Wednesday at 9am ET for designs to be presented. Perhaps your team's designer could attend that by reaching out to Adam. cc @oliviaflory@matthewgallo@elycheea
The problem
DataTable (and @carbon/ibm-products' Datagrid) support adding slugs to column headers and rows. It's shown in Storybook as an "AI label".
However, we are using it to insert an info tooltip in the column headers:
For the AI label, Carbon inserts a blue gradient in the data cells, and the blue bar at the top:
However, we don't want that styling (since our info tooltip is unrelated to AI):
Since we don't want that styling, I need to override Carbon's styling. But this is not trivial, because DataTable has styling for selected rows, hovered rows, hovered + selected rows, child rows, etc. This is what worked for me but it's not complete:
The solution
I'm wondering if you could make all the blue styling optional, i.e. opt-in, since it would be easier to enable rather than to have to override the Carbon styling. Something maybe like
Examples
No response
Application/PAL
IKC
Business priority
None
Available extra resources
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: