Search code examples
javascripthtmlcsshoverwindow.open

Why is my CSS file only partially loading when using window.open()


I am having an issue where I created a new window, imported my CSS, passed over my div and then I import my scripts but the new window is missing part of my CSS rules from what I can tell.

I have it set up so that on hover a tooltip shows up for the button, but in the new window the tooltip CSS rules are not applying although others are.

I have included a codesandbox.io link where I isolated the issue I am having from the rest of my page. Any help is appreciated. Thank you.


Solution

  • i've checked the opened window requests and it loaded the css just fine, the problem is that you have a typo in your css class name, the span class tooltipText and your css rule is .tooltip:hover .tooltiptext, just change the upper case T.

    Have a good day.

    Edit: working fine.