Bug : ":has(:hover)" not working in single tindler window (chromium browser), and a PR to fix this

This css work in the story but not when opening the tiddler in a separate window:

<article>
<p>if this text is green when hovered, :has work</p>
</article>

<pre>
<style style="display:block;" contenteditable>
article:has(:hover){color: green;}
</style>
</pre>

bughas

Is this a tiddlywiki bug ? Is there a way to make this work ?

demo

1 Like

Strangely, by specifying which element is hovered, it now works in both cases:

article:has(p:hover){color: green;}

I still don’t understand why

article:has(:hover){color: green;}

Works in the story but not in single tiddler view ?

I think I found the issue, this is because the template is missing <!DOCTYPE html>.

I made a PR: Set a proper doctype for the open window template by Telumire · Pull Request #8095 · Jermolene/TiddlyWiki5 (github.com)

3 Likes

Great catch.    

1 Like