MediaWiki:Common.css/src/content/terraria.scss
< MediaWiki:Common.css | src
Jump to navigation
Jump to search
This page is one of the SCSS pages which are the basis for MediaWiki:Common.css. After you edit this page, you will need to recompile them for your changes to take effect. See Terraria Wiki:CSS to learn more.
Ancestors: / src / content / terraria.scss
Siblings: ToC.scss heading.scss table.scss table.terraria.scss terraria.scss thumbnails,gallery.scss
Children: (none)
/********* Characteristic "terraria" class *********/
/* Styling for "terraria"-classed tables and boxes */
/* See [[MediaWiki:Common.css/src/interface/makeCollapsible.scss]] for the base
* collapsible box styling. */
.terraria {
--theme-heading-background: var(--theme-highlight-background);
border: 1px var(--theme-box-border-color) solid;
padding: 8px 12px;
border-radius: var(--theme-box-border-radius);
min-height: 1.5em;
position: relative;
overflow: auto; /* for float box */
> .heading,
> .mw-collapsible-content > .heading {
background: var(--theme-heading-background);
text-align: center;
font-weight: bold;
line-height: 2;
min-height: 2em;
padding: 3px 6px;
font-size: inherit;
margin: 8px -8px;
}
> .heading:first-child,
> .mw-collapsible-toggle:first-child + .mw-collapsible-content > .heading:first-child {
margin-top: -4px;
}
> .heading:nth-of-type(1),
> .mw-collapsible-content > .heading:nth-of-type(1) {
margin-top: auto;
}
/* Here we do not need to add
".terraria > .heading:last-child{ margin-bottom: auto; }"
since there can be a text node after the :last-child element.
*/
> .mw-collapsible-toggle {
/* collapsible-toggle in .terraria box */
position: absolute;
line-height: 1;
right: 12px;
top: 12px;
font-size: 12px;
> .mw-collapsible-bracket {
display: none;
}
&:before {
content: "";
vertical-align: middle;
display: inline-block;
width: 0;
height: 0;
border-color: var(--theme-collapsible-toggle-icon-color) transparent;
border-style: solid;
border-width: 0 0.4em 0.45em;
margin-right: 0.2em;
}
&:after {
content: "";
}
&.mw-collapsible-toggle-collapsed:before {
border-width: 0.45em 0.4em 0;
}
}
&:hover > .mw-collapsible-toggle:before {
border-color: var(--theme-collapsible-toggle-icon-color-hover) transparent;
}
}
/* @import content/table.terraria.css */