MediaWiki:Gadget-Tabs.css

/* General notes: * The classes here are applied by JS and Lua scripts at MediaWiki:Gadget-Tabs.js and Module:UtilsLayout/Tabs, respectively. * * The > selector is used here to account for the possibility of tabs nested within tabs (e.g. Template:Media) * The different tab containers may have different styling options set, * so it's important that styles are only applied to direct children rather than all descendants */

.tabcontainer { display: flex; flex-wrap: wrap; } .tabcontainer--center { justify-content: center; } .tabcontainer--stretch > .tab { flex: 1 0 0; } .tabcontainer--columns > .tab { flex: 1 0 100%; } .tabcontainer-top { margin-top: 4px; margin-bottom: 8px; } .tabcontainer-bottom { margin-top: 8px; margin-bottom: 4px; }

.tab { min-width: fit-content; box-sizing: border-box; }

.tabcontents > .content { display: none; } .tabcontents > .content.content--active { display: block; }

/* No need to add class for top vertical alignment because "start" is the default CSS value for align-self */ .tabcontents--align-y-center > .content { align-self: center; } .tabcontents--align-y-bottom > .content { align-self: end; }

/* The idea behind fixed width/height is to overlap all the images one over the other, * so that the container takes on the width/height of the largest tab. */ .tabcontents--fixed-width, .tabcontents--fixed-height { display: grid; grid-template-columns: 1fr; } .tabcontents--fixed-width > .content, .tabcontents--fixed-height > .content { display: block; grid-row: 1; grid-column: 1; } .tabcontents--fixed-width > .content:not(.content--active), .tabcontents--fixed-height > .content:not(.content--active) { visibility: hidden; } .tabcontents--fixed-width:not(.tabcontents--fixed-height) > .content:not(.content--active) { height: 0; } .tabcontents--fixed-height:not(.tabcontents--fixed-width) > .content:not(.content--active) { width: 0; }

.tabcontainer .tab.explain { /* See MediaWiki:Gadget-Tooltips */ text-decoration: none; float: none; display: inline-block; }