The default behavior for elements without a set z-index is to stack in the order they appear in the DOM. Since the sticky element creates its own stacking context, any absolutely positioned children are constrained to this context and appear behind subsequent content.
I dont have the skills to validate the approach but a solution is welcome.
I do think such a change needs to be concidered along side the overall page template because I have seen similar artifacts in other places, where the z-index is insufficient to correct it.
perhaps the same needs to be applied elsewhere?
could this change result in new artifacts?
what about when the z-index has being used by custom solutions or plugins to overcome current issues will they cause problems if you apply this fix.
Intuitively, I would say that this shouldn’t cause any issues, since usually when we set a z-index, it’s to layer something above another element. Therefore, this should not disrupt the layout, but it would be a good idea to test this extensively … I will try applying this to the original TiddlyWiki website instead of using the current fix to see if it causes any noticeable issues.
EDIT: so far so good, but let me know if you find a case where it doesnt work !
I won’t make a pr for this because tiddlywiki aim to support old browsers, but maybe it will be usefull for a future version of tiddlywiki
yes but if you enable sticky titles the z-index will be set manually on the next tiddlers and this wont work, unless you use a z-index of 201 (max z-index = 200)
Alternatively, you can edit “$:/themes/tiddlywiki/vanilla/sticky” with this: