ix icon indicating copy to clipboard operation
ix copied to clipboard

Parent element style leaks into ix-tooltip

Open TDaniel-evo opened this issue 1 year ago • 5 comments

Prerequisites

  • [X] I have not leaked any internal company information.
  • [ ] I have not posted internal links or code snippets.

What happened?

CSS style set on parent element leaks into ix-tooltip image

What type of frontend frameware are you seeing the problem on?

Angular

Which version of iX do you use?

2.0.3

Code to produce this issue.

<div style={background-color: red}>
  <div id="1"></div>
  <ix-tooltip for="[id=1]">Example</ix-tooltip> <-- gets red background color
</div>

TDaniel-evo avatar Jan 30 '24 14:01 TDaniel-evo

I think this is an expected behavior if you want to manage background you can have a look https://stackblitz.com/~/edit/xnfrdi-qu2sx2

ridvandmrc avatar Feb 04 '24 22:02 ridvandmrc

I think you copied a wrong stackblitz link, this one doesn't have any ix-tooltip. Anyway, I thought that outer css should not leak into ix component's shadow root. It's a bit strange to me that when I use the ix-tooltip in a html table, the table's style applies to the ix tooltip and I have to "reset" the tooltip style to the original.

image

or maybe the .table>:not(caption)>*>* selector is the problem

TDaniel-evo avatar Feb 05 '24 10:02 TDaniel-evo

Could you give a little more information, I have tried to recreate it: https://stackblitz.com/edit/p7ij6z?file=src%2Fapp%2Ftooltip.html,src%2Fstyles.css

matthiashader avatar Feb 07 '24 10:02 matthiashader

The documentation suggests that I should use "table" class in a table: https://ix.siemens.io/docs/controls/html-grid If you add the "table" class to the table in the example you can see that the tooltip inside the table is losing it because of this selector: .table > :not(caption) > * > * applies to the tooltip as well. image

TDaniel-evo avatar Feb 08 '24 08:02 TDaniel-evo

Thank you very much, we will discuss this issue

Internal ref [IX-901]

matthiashader avatar Feb 08 '24 08:02 matthiashader