Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

MediaWiki:Common.css: Difference between revisions

MediaWiki interface page
No edit summary
Tag: Reverted
Move infobox CSS from module style page
 
(221 intermediate revisions by 2 users not shown)
Line 1: Line 1:
/* CSS placed here will be applied to all skins */
/* CSS placed here will be applied to all skins */


@import url('https://fonts.googleapis.com/css?family=Open+Sans');
/* Weights can be grabbed if necessary */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans');
@import url('https://fonts.googleapis.com/css2?family=Montserrat');
 
/*BEGIN GRID FORMATTING*/
.image-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    padding: 0 10px 10px 0;
    width: 100%;
}
 
.image-wrapper {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: auto;
    /*padding-bottom: 100%;*/
    cursor: pointer;
}
 
.image-wrapper:hover img {
    transform: scale(1.05);
}
 
.image-wrapper img {
    width: 100%;
    height: auto;
    object-fit: cover;
    transition: transform 0.3s ease;
}
 
.image-text-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 10px;
    box-sizing: border-box;
}
 
.image-text-main {
    text-align: center;
    color: white;
    font-size: 20px;
    font-weight: bold;
    margin: 0;
}
 
.image-text-sub {
text-align: center;
    color: white;
    font-size: 10px;
    font-weight: normal;
    margin: 0;
}
/*END GRID FORMATTING*/
 
/* BEGIN GALLERY TRANSFORMATIONS */
/* Specific to packed-overlay galleries: Initial collapsed state for the text */
ul.mw-gallery-packed-overlay li.gallerybox div.gallerytextwrapper div.gallerytext {
    padding: 0;
    padding-right: var(--border-radius-base);
    padding-left: var(--border-radius-base);
    font-size: var(--font-size-x-small);
    color: var(--color-subtle);
    letter-spacing: 0.025em;
    max-height: 50px;  /* Only collapse in packed-overlay type */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;  /* Prevent text from wrapping */
    transition: max-height 0.3s ease-in-out, white-space 0.3s ease-in-out;
}
 
/* Make sure gallerytextwrapper remains at the correct position */
ul.mw-gallery-packed-overlay li.gallerybox div.gallerytextwrapper div.gallerytextwrapper {
    position: absolute;
    background: #fff;
    background: rgba(255, 255, 255, 0.8);
    padding: 5px 10px;
    bottom: 0;
    left: 0;
    height: auto;
    max-height: 40%;
    overflow: hidden;
    font-weight: bold;
    margin: 2px;
}
 
/* Expand text on hover, but only for packed-overlay galleries */
ul.mw-gallery-packed-overlay li.gallerybox div.gallerytextwrapper:hover div.gallerytext {
    max-height: none;  /* Remove height restriction */
    white-space: normal;  /* Allow text to wrap */
    overflow: visible;
    text-overflow: clip;
}
 
/* Ensure other gallery types (e.g., mw-gallery-packed-hover) display text normally */
li.gallerybox div.gallerytextwrapper div.gallerytext {
    max-height: none;  /* No collapsing for other gallery types */
    white-space: normal;  /* Allow text to wrap normally */
    overflow: visible;
    text-overflow: clip;
}
/* END GALLERY TRANSFORMATIONS */
 
/* BEGIN INFOBOX TRANSFORMATIONS */
.infobox {
/* In case if tooltips go out of boundary */
overflow: visible;
width: 100%;
max-width: 400px;
margin-top: 0;
margin-bottom: var( --space-md );
background: var( --color-surface-2 );
border-radius: var( --border-radius--medium );
border-spacing: 0;
font-size: 0.875rem;
text-align: left;
display: block;
}
 
/* Table elements */
.infobox tbody {
display: flex;
flex-wrap: wrap;
}
 
.infobox tr {
display: flex;
box-sizing: border-box;
flex-direction: column;
padding: 0 10px;
margin-top: 10px;
}
 
.infobox th,
.infobox td {
padding: 0 5px;
}
 
/* Infobox column */
.infobox .infobox-nocol {
width: 100%;
flex-direction: row;
}
 
.infobox .infobox-nocol th {
width: 30%;
}
 
.infobox .infobox-nocol td {
width: 70%;
}
 
.infobox .infobox-col1 {
width: 100%;
}
 
.infobox .infobox-col2 {
width: 50%;
}
 
.infobox .infobox-col3 {
width: calc( 100% / 3 );
}
 
.infobox .infobox-col4 {
width: 25%;
}
 
.infobox-data {
min-width: 25%;
}
 
/* Infobox image */
.infobox .infobox-image {
overflow: hidden;
padding: 0;
margin-top: 0;
border-radius: var( --border-radius--medium ) var( --border-radius--medium ) 0 0;
}
 
.infobox-image td {
padding: 0;
}
 
.infobox-image--light .image {
background: #eaecf0;
}
 
.infobox-image--dark .image {
background: #2b2f36;
}
 
.infobox-image .image:hover img {
transform: scale( 1.1 );
}
 
.infobox-image img {
display: block;
max-width: 100%;
background: var( --background-color-quiet--hover );
}
 
/* Neutral background for all transprent SVG */
.infobox-image img[ src$='.svg' ] {
background: #eaecf0;
}
 
/* Infobox title */
.infobox .infobox-title {
width: 100%;
margin-top: 20px;
margin-bottom: 5px;
color: var( --color-base--emphasized );
font-size: var( --font-size-x-large );
    line-height: var( --line-height-xs );
}
 
/* Infobox indicator */
.infobox .infobox-indicator {
margin-top: 0;
padding: 0;
}
 
/* Infobox subtitle */
.infobox .infobox-subtitle {
/* Cancel infobox-title bottom margin */
margin-top: -5px;
margin-bottom: 5px;
}
 
.infobox .infobox-indicator th,
.infobox .infobox-subtitle th {
display: none;
}
 
/* Infobox header */
.infobox .infobox-header {
width: 100%;
padding-top: 15px;
    border-top: 1px solid;
border-color: var( --border-color-base );
margin-top: 15px;
color: var( --color-base--emphasized );
line-height: var( --line-height-xs );
font-size: 1rem;
}
 
/* Infobox value */
.infobox-data th {
color: var( --color-base--subtle );
font-size: 0.8125rem;
font-weight: normal;
letter-spacing: 0.75px;
}
 
.infobox-data td {
font-weight: 600;
}
 
.infobox-data ul,
.infobox-data ol {
margin-top: 0;
}
 
/* Infobox button */
.infobox .infobox-button-bar {
width: 100%;
padding: 0;
margin-top: 25px;
text-align: center;
}
 
.infobox-button-bar th {
padding: 0;
}
 
/* Collapsible toggle */
.infobox tr:first-of-type .mw-collapsible-toggle {
position: relative;
display: none;
float: none;
}
 
.infobox tr:first-of-type .mw-collapsible-toggle .mw-collapsible-text {
position: absolute;
right: 0;
display: block;
padding: 5px 15px;
background: var( --color-destructive );
border-radius: 0 var( --border-radius--medium );
color: #fff;
}
 
.infobox tr:first-of-type .mw-collapsible-toggle .mw-collapsible-text:hover {
background: var( --color-destructive--hover );
}
 
.infobox tr:first-of-type .mw-collapsible-toggle .mw-collapsible-text:active {
background: var( --color-destructive--active );
}
 
.infobox tr:first-of-type .mw-collapsible-toggle-collapsed .mw-collapsible-text {
background: var( --color-primary );
}
 
.infobox tr:first-of-type .mw-collapsible-toggle-collapsed .mw-collapsible-text:hover {
background: var( --color-primary--hover );
}
 
.infobox tr:first-of-type .mw-collapsible-toggle-collapsed .mw-collapsible-text:active {
background: var( --color-primary--active );
}
 
.infobox tr:first-of-type .mw-collapsible-toggle:before,
.infobox tr:first-of-type .mw-collapsible-toggle:after {
content: none;
}
/* END INFOBOX TRANSFORMATIONS */
 
@media only screen and ( max-width: 720px ) {
.infobox {
margin-right: auto;
margin-left: auto;
}
 
.infobox tr:first-of-type .mw-collapsible-toggle {
display: block;
}
}


.navbox-title
.navbox-title
Line 10: Line 343:


body, body #mw-page-base {
body, body #mw-page-base {
background: url( https://wiki.massivecraft.com/images/e/ee/Bg3.png);
background: url(https://wiki.massivecraft.com/images/e/ee/Bg3.png);
background-repeat: no-repeat;
background-repeat: no-repeat;
}
}
Line 18: Line 351:
}
}


.scroll-table table {
.mainpage_box {
max-width: 100%;
    margin: 0;
overflow: hidden;
    min-width: 210px;
display: block;
    box-shadow: 0 2px 2px rgba(102, 121, 153, 0.2);
overflow-x: auto;
    display: inline-block;
white-space: nowrap;
    padding: 0 0 0 10px;
}
 
/* light theme */
.skin-theme-clientpref-day .mainpage_box {
    background-color: #E4E9F1;
}
 
/* dark theme */
.skin-theme-clientpref-night .mainpage_box {
    background-color: #191E29;
}
 
/* auto theme */
.skin-theme-clientpref-os .mainpage_box {
    background: var( --color-surface-2 );
}
 
 
.mainpage_box p {
margin: 0;
}
 
.mw-collapsible span.mw-collapsible-toggle {
    float:left;
    margin-left:0;
    margin-right:1em;
    vertical-align:bottom;
}
 
.button-contain {
font-size:160%;
padding-left: 10px;
padding-right: 10px;
}
 
.infobox {
border: 1px solid #C9D8CC;
border-spacing: 0;
}
#bodyContent .plainlinks a {
background: none !important;
padding: 0 !important;
color: #002bb8 !important;
}
 
/* {{pp|small=yes}} */
.div-col {
margin-top: 0.3em;
column-width: 40em;
column-rule: 1px solid #aaa;
}
 
/* Reset top margin for lists in div col */
.div-col dl,
.div-col ol,
.div-col ul {
margin-top: 0;
}
}


.eighty-width img {
/* Avoid elements breaking between columns
    width: 80%;
  See also Template:No col break */
    height: auto;
.div-col li,
.div-col dd {
page-break-inside: avoid; /* Removed from CSS in favor of break-inside c. 2020 */
break-inside: avoid-column;
}
}


.fifty-width-left img {
/* {{pp|small=yes}} */
    max-width: 50%;
.div-col-rel {
    height: auto;
margin-top: 0.3em;
    float: left;
column-width: 40em;
column-rule: 1px solid #aaa;
}
}


.fifty-width-right img {
/* Reset top margin for lists in div col */
    max-width: 50%;
.div-col-rel dl,
    height: auto;
.div-col-rel ol,
    float: right;
.div-col-rel ul {
margin-top: 0;
}
}


.topbanner img {
/* Avoid elements breaking between columns
    max-width: 100%;
  See also Template:No col break */
    height: auto;
.div-col-rel li,
.div-col-rel dd {
page-break-inside: avoid; /* Removed from CSS in favor of break-inside c. 2020 */
break-inside: avoid-column;
}
}

Latest revision as of 19:27, 27 September 2024

/* CSS placed here will be applied to all skins */

/* Weights can be grabbed if necessary */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans');
@import url('https://fonts.googleapis.com/css2?family=Montserrat');

/*BEGIN GRID FORMATTING*/
.image-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    padding: 0 10px 10px 0;
    width: 100%;
}

.image-wrapper {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: auto;
    /*padding-bottom: 100%;*/
    cursor: pointer;
}

.image-wrapper:hover img {
    transform: scale(1.05); 
}

.image-wrapper img {
    width: 100%;
    height: auto;
    object-fit: cover; 
    transition: transform 0.3s ease;
}

.image-text-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.7); 
    padding: 10px; 
    box-sizing: border-box; 
}

.image-text-main {
    text-align: center; 
    color: white;
    font-size: 20px;
    font-weight: bold;
    margin: 0;
}

.image-text-sub {
	text-align: center;
    color: white;
    font-size: 10px;
    font-weight: normal;
    margin: 0; 
}
/*END GRID FORMATTING*/

/* BEGIN GALLERY TRANSFORMATIONS */
/* Specific to packed-overlay galleries: Initial collapsed state for the text */
ul.mw-gallery-packed-overlay li.gallerybox div.gallerytextwrapper div.gallerytext {
    padding: 0;
    padding-right: var(--border-radius-base);
    padding-left: var(--border-radius-base);
    font-size: var(--font-size-x-small);
    color: var(--color-subtle);
    letter-spacing: 0.025em;
    max-height: 50px;  /* Only collapse in packed-overlay type */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;  /* Prevent text from wrapping */
    transition: max-height 0.3s ease-in-out, white-space 0.3s ease-in-out;
}

/* Make sure gallerytextwrapper remains at the correct position */
ul.mw-gallery-packed-overlay li.gallerybox div.gallerytextwrapper div.gallerytextwrapper {
    position: absolute;
    background: #fff;
    background: rgba(255, 255, 255, 0.8);
    padding: 5px 10px;
    bottom: 0;
    left: 0;
    height: auto;
    max-height: 40%;
    overflow: hidden;
    font-weight: bold;
    margin: 2px;
}

/* Expand text on hover, but only for packed-overlay galleries */
ul.mw-gallery-packed-overlay li.gallerybox div.gallerytextwrapper:hover div.gallerytext {
    max-height: none;  /* Remove height restriction */
    white-space: normal;  /* Allow text to wrap */
    overflow: visible;
    text-overflow: clip;
}

/* Ensure other gallery types (e.g., mw-gallery-packed-hover) display text normally */
li.gallerybox div.gallerytextwrapper div.gallerytext {
    max-height: none;  /* No collapsing for other gallery types */
    white-space: normal;  /* Allow text to wrap normally */
    overflow: visible;
    text-overflow: clip;
}
/* END GALLERY TRANSFORMATIONS */

/* BEGIN INFOBOX TRANSFORMATIONS */
.infobox {
	/* In case if tooltips go out of boundary */
	overflow: visible;
	width: 100%;
	max-width: 400px;
	margin-top: 0;
	margin-bottom: var( --space-md );
	background: var( --color-surface-2 );
	border-radius: var( --border-radius--medium );
	border-spacing: 0;
	font-size: 0.875rem;
	text-align: left;
	display: block;
}

/* Table elements */
.infobox tbody {
	display: flex;
	flex-wrap: wrap;
}

.infobox tr {
	display: flex;
	box-sizing: border-box;
	flex-direction: column;
	padding: 0 10px;
	margin-top: 10px;
}

.infobox th,
.infobox td {
	padding: 0 5px;
}

/* Infobox column */
.infobox .infobox-nocol {
	width: 100%;
	flex-direction: row;
}

.infobox .infobox-nocol th {
	width: 30%;
}

.infobox .infobox-nocol td {
	width: 70%;
}

.infobox .infobox-col1 {
	width: 100%;
}

.infobox .infobox-col2 {
	width: 50%;
}

.infobox .infobox-col3 {
	width: calc( 100% / 3 );
}

.infobox .infobox-col4 {
	width: 25%;
}

.infobox-data {
	min-width: 25%;
}

/* Infobox image */
.infobox .infobox-image {
	overflow: hidden;
	padding: 0;
	margin-top: 0;
	border-radius: var( --border-radius--medium ) var( --border-radius--medium ) 0 0;
}

.infobox-image td {
	padding: 0;
}

.infobox-image--light .image {
	background: #eaecf0;
}

.infobox-image--dark .image {
	background: #2b2f36;
}

.infobox-image .image:hover img {
	transform: scale( 1.1 );
}

.infobox-image img {
	display: block;
	max-width: 100%;
	background: var( --background-color-quiet--hover );
}

/* Neutral background for all transprent SVG */
.infobox-image img[ src$='.svg' ] {
	background: #eaecf0;
}

/* Infobox title */
.infobox .infobox-title {
	width: 100%;
	margin-top: 20px;
	margin-bottom: 5px;
	color: var( --color-base--emphasized );
	font-size: var( --font-size-x-large );
    line-height: var( --line-height-xs );
}

/* Infobox indicator */
.infobox .infobox-indicator {
	margin-top: 0;
	padding: 0;
}

/* Infobox subtitle */
.infobox .infobox-subtitle {
	/* Cancel infobox-title bottom margin */
	margin-top: -5px;
	margin-bottom: 5px;
}

.infobox .infobox-indicator th,
.infobox .infobox-subtitle th {
	display: none;
}

/* Infobox header */
.infobox .infobox-header {
	width: 100%;
	padding-top: 15px;
    border-top: 1px solid;
	border-color: var( --border-color-base );
	margin-top: 15px;
	color: var( --color-base--emphasized );
	line-height: var( --line-height-xs );
	font-size: 1rem;
}

/* Infobox value */
.infobox-data th {
	color: var( --color-base--subtle );
	font-size: 0.8125rem;
	font-weight: normal;
	letter-spacing: 0.75px;
}

.infobox-data td {
	font-weight: 600;
}

.infobox-data ul,
.infobox-data ol {
	margin-top: 0;
}

/* Infobox button */
.infobox .infobox-button-bar {
	width: 100%;
	padding: 0;
	margin-top: 25px;
	text-align: center;
}

.infobox-button-bar th {
	padding: 0;
}

/* Collapsible toggle */
.infobox tr:first-of-type .mw-collapsible-toggle {
	position: relative;
	display: none;
	float: none;
}

.infobox tr:first-of-type .mw-collapsible-toggle .mw-collapsible-text {
	position: absolute;
	right: 0;
	display: block;
	padding: 5px 15px;
	background: var( --color-destructive );
	border-radius: 0 var( --border-radius--medium );
	color: #fff;
}

.infobox tr:first-of-type .mw-collapsible-toggle .mw-collapsible-text:hover {
	background: var( --color-destructive--hover );
}

.infobox tr:first-of-type .mw-collapsible-toggle .mw-collapsible-text:active {
	background: var( --color-destructive--active );
}

.infobox tr:first-of-type .mw-collapsible-toggle-collapsed .mw-collapsible-text {
	background: var( --color-primary );
}

.infobox tr:first-of-type .mw-collapsible-toggle-collapsed .mw-collapsible-text:hover {
	background: var( --color-primary--hover );
}

.infobox tr:first-of-type .mw-collapsible-toggle-collapsed .mw-collapsible-text:active {
	background: var( --color-primary--active );
}

.infobox tr:first-of-type .mw-collapsible-toggle:before,
.infobox tr:first-of-type .mw-collapsible-toggle:after {
	content: none;
}
/* END INFOBOX TRANSFORMATIONS */

@media only screen and ( max-width: 720px ) {
	.infobox {
		margin-right: auto;
		margin-left: auto;
	}

	.infobox tr:first-of-type .mw-collapsible-toggle {
		display: block;
	}
}

.navbox-title
{
	width: 100%;
	min-width:100%;
}

body, body #mw-page-base {
	background: url(https://wiki.massivecraft.com/images/e/ee/Bg3.png);
	background-repeat: no-repeat;
}

#simpleSearch input {
    background-color: #ffffff;
}

.mainpage_box {
    margin: 0;
    min-width: 210px;
    box-shadow: 0 2px 2px rgba(102, 121, 153, 0.2);
    display: inline-block;
    padding: 0 0 0 10px;
}

/* light theme */
.skin-theme-clientpref-day .mainpage_box {
    background-color: #E4E9F1; 
}

/* dark theme */
.skin-theme-clientpref-night .mainpage_box {
    background-color: #191E29; 
}

/* auto theme */
.skin-theme-clientpref-os .mainpage_box {
    background: var( --color-surface-2 );
}


.mainpage_box p {
	margin: 0;
}

.mw-collapsible span.mw-collapsible-toggle {
    float:left;
    margin-left:0;
    margin-right:1em;
    vertical-align:bottom;
}

.button-contain {
	font-size:160%;
	padding-left: 10px;
	padding-right: 10px;
}

.infobox {
	border: 1px solid #C9D8CC;
	border-spacing: 0;
}
	
#bodyContent .plainlinks a {
	background: none !important;
	padding: 0 !important;
	color: #002bb8 !important;
}

/* {{pp|small=yes}} */
.div-col {
	margin-top: 0.3em;
	column-width: 40em;
	column-rule: 1px solid #aaa;
}

/* Reset top margin for lists in div col */
.div-col dl,
.div-col ol,
.div-col ul {
	margin-top: 0;
}

/* Avoid elements breaking between columns
   See also Template:No col break */
.div-col li,
.div-col dd {
	page-break-inside: avoid; /* Removed from CSS in favor of break-inside c. 2020 */
	break-inside: avoid-column;
}

/* {{pp|small=yes}} */
.div-col-rel {
	margin-top: 0.3em;
	column-width: 40em;
	column-rule: 1px solid #aaa;
}

/* Reset top margin for lists in div col */
.div-col-rel dl,
.div-col-rel ol,
.div-col-rel ul {
	margin-top: 0;
}

/* Avoid elements breaking between columns
   See also Template:No col break */
.div-col-rel li,
.div-col-rel dd {
	page-break-inside: avoid; /* Removed from CSS in favor of break-inside c. 2020 */
	break-inside: avoid-column;
}