MediaWiki:Common.css: Difference between revisions
From The Fifth City Wiki
Add class to render element above others if specific child elements are hovered |
m Forgot the :has :p (Code editor on mediawiki is claiming this has an error, but I cannot figure out what, and the W3C CSS validator says there is nothing? So I'm going to publish the edit. It should probably be fine.) |
||
Line 2: | Line 2: | ||
/* Orders element above others if specific child elements hovered */ | /* Orders element above others if specific child elements hovered */ | ||
.frontOnChildHover .hoverChild:hover { | .frontOnChildHover:has(.hoverChild:hover) { | ||
z-index: 10; | z-index: 10; | ||
} | } |
Revision as of 08:23, 23 June 2025
/* CSS placed here will be applied to all skins */ /* Orders element above others if specific child elements hovered */ .frontOnChildHover:has(.hoverChild:hover) { z-index: 10; } /* Rules for the citation generator */ #citegen_input_url, #citegen_input_title, #citegen_input_source, #citegen_input_quote { width: 60%; } #citecont_url, #citecont_title, #citecont_source, #citecont_quote, #citecont_opt, #citecont_output { margin: 0 0 1rem 0; } /* Basic tooltip css */ /* Used in the following way: <any_tag class = "hastooltip"> Stuff That Has Tooltip When You Hover Over It <div class = "tooltip"> Tooltip Content </div> </any_tag> */ .hastooltip { position: relative; } .hastooltip .tooltip { visibility: hidden; /* Tooltip styling */ border: 2px dashed darkgray; background-color: black; padding: 5px; text-align: center; color: white; /* Tooltip positioning */ position: absolute; z-index: -1; bottom: 100%; } .hastooltip:hover .tooltip { visibility: visible; z-index: 1; }