Template:Infobox servant/styles.css: Difference between revisions

From ServantPedia™, the paid (but reliable) encyclopedia
Jump to navigation Jump to search
Created page with "{{pp-template}}: .ib-character { border-spacing: 2px 5px; } .ib-character .infobox-above, .ib-character .infobox-header { background-color: #DEDEE2; } light background for transparent images: .ib-character .infobox-image img { background-color: #f8f9fa; } @media screen { html.skin-theme-clientpref-night .ib-character .infobox-above, html.skin-theme-clientpref-night .ib-character .infobox-header { background: hsl(240, 6%, 20%); color: inherit; } }..."
 
No edit summary
Line 2: Line 2:
.ib-character {
.ib-character {
border-spacing: 2px 5px;
border-spacing: 2px 5px;
}
/* Ensure content is vertically centered */
.ib-character .infobox-data {
    vertical-align: middle;
}
.ib-character img {
    max-width: 280px; /* Set the maximum width of the image */
    height: auto;    /* Maintain the aspect ratio */
    display: block;  /* Ensure the image is treated as a block element */
    margin: 0 auto;  /* Center the image horizontally */
}
}



Revision as of 13:27, 7 April 2025

/* {{pp-template}} */
.ib-character {
	border-spacing: 2px 5px;
}

/* Ensure content is vertically centered */
.ib-character .infobox-data {
    vertical-align: middle;
}

.ib-character img {
    max-width: 280px; /* Set the maximum width of the image */
    height: auto;     /* Maintain the aspect ratio */
    display: block;   /* Ensure the image is treated as a block element */
    margin: 0 auto;   /* Center the image horizontally */
}

.ib-character .infobox-above,
.ib-character .infobox-header {
	background-color: #DEDEE2;
}

/* light background for transparent images */
.ib-character .infobox-image img {
	background-color: #f8f9fa;
}

@media screen {
	html.skin-theme-clientpref-night .ib-character .infobox-above,
	html.skin-theme-clientpref-night .ib-character .infobox-header {
		background: hsl(240, 6%, 20%);
		color: inherit;
	}
}

@media screen and (prefers-color-scheme: dark) {
	html.skin-theme-clientpref-os .ib-character .infobox-above,
	html.skin-theme-clientpref-os .ib-character .infobox-header {
		background: hsl(240, 6%, 20%);
		color: inherit;
	}
}