Lompat ke isi

Modul:Navbox/div/styles.css

Tingon Wikipedia
.navbox-div {
	box-sizing: border-box;
	border: 1px solid var(--border-color-base, #a2a9b1);
	clear: both;
	font-size: 88%;
	padding: 3px;
	margin: 1em auto 0; /* Prevent preceding content from clinging to navboxes */
}

.navbox-div .navbox-div {
	margin-top: 0; /* No top margin for nested navboxes */
}

.navbox-div + .navbox-div-styles + .navbox-div {
	margin-top: -1px; /* Single pixel border between adjacent navboxes */
}

.navbox-div-title {
	font-size: 114%;
}

.navbox-div .mw-collapsible-toggle {
	padding-right: 1em;
}

.navbox-div-group,
.navbox-div-title-and-bar,
.navbox-div-abovebelow {
	padding: 0.25em 1em;
	line-height: 1.5em;
}

.navbox-div-group,
.navbox-div-title {
	font-weight: bold;
}
	
.navbox-div-lists {
	display: grid;
	gap: 2px;
}

.navbox-div-list {
	line-height: 1.5em;
	padding: 0 0.25em
}

.navbox-div-abovebelow:not(.navbox-div-below),
.navbox-div-main {
	margin: 2px 0;
}

.navbox-div-image,
.navbox-div-leftimage,
.navbox-div-list-groupless {
	text-align: center;
}

.navbox-div .mw-collapsible-content .hlist dl,
.navbox-div .mw-collapsible-content .hlist ol,
.navbox-div .mw-collapsible-content .hlist ul {
	padding: 0.125em 0;
}

.navbox-div .navbar {
	font-size: 100%;
	display: block;
	/* @noflip */
	float: left;
	/* @noflip */
	margin-right: 0.5em;
}

@media screen {
	.navbox-div,
	.navbox-div-subgroup {
		background-color: #fdfdfd; /* hsl(0, 0%, 99.22%) */
	}
	
	.navbox-div-title-and-bar {
		background-color: #ccf; /* Level 1 color hsl(240, 100%, 90%) */
	}
	
	.navbox-div-abovebelow,
	.navbox-div-group,
	.navbox-div-subgroup .navbox-div-title-and-bar {
		background-color: #ddf; /* Level 2 color hsl(240, 100%, 93.33%) */
	}
	
	.navbox-div-subgroup .navbox-div-group,
	.navbox-div-subgroup .navbox-div-abovebelow {
		background-color: #e6e6ff; /* Level 3 color hsl(240, 100%, 95.1%) */
	}
	
	.navbox-div-even {
		background-color: #f7f7f7; /* hsl(0, 0%, 96.86%) */
	}
	
	/*
	.navbox-div-odd {
		background-color: transparent;
	}
	*/
	
	/* the dark greys used in this template are flips of their colors above with
	 * an offset from the standard dark background
	 * which is #202122 hsl(210, 3.03%, 12.94%) with rounding hsl(210, 3%, 13%)
	 * e.g. normally .navbox-div is hsl(0, 0%, 99%)
	 * flip is hsl(0, 0%, 1%)
	 * then add the 1% to #202122 to get hsl(210, 3%, 14%)
	 * ... I know it's rough
	 */
	html.skin-theme-clientpref-night .navbox-div,
	html.skin-theme-clientpref-night .navbox-div-subgroup {
		background-color: hsl(210, 3%, 14%);
	}
	
	html.skin-theme-clientpref-night .navbox-div-title-and-bar {
		background-color: hsl(240, 100%, 10%); /* Level 1 color */
	}
	
	html.skin-theme-clientpref-night .navbox-div-abovebelow,
	html.skin-theme-clientpref-night .navbox-div-group,
	html.skin-theme-clientpref-night .navbox-div-subgroup .navbox-div-title-and-bar {
		background-color: hsl(240, 100%, 7%); /* Level 2 color */
	}
	
	html.skin-theme-clientpref-night .navbox-div-subgroup .navbox-div-group,
	html.skin-theme-clientpref-night .navbox-div-subgroup .navbox-div-abovebelow {
		background-color: hsl(240, 100%, 5%); /* Level 3 color */
	}
	
	html.skin-theme-clientpref-night .navbox-div-even {
		background-color: hsl(210, 3%, 16%);
	}
	
	/*
	html.skin-theme-clientpref-night .navbox-div-odd {
		background-color: transparent;
	}
	*/
}

@media (min-width: 720px) {
	.navbox-div {
		text-align: center;
	}

	.navbox-div.mw-collapsible .navbox-div-title {
		margin: 0 4em;
	}

	.navbox-div-group {
		white-space: nowrap;
		justify-content: flex-end;
	}

	.navbox-div-list-with-group {
		text-align: left;
	}
	
	/* in case the group wraps with <br> or wrap setting, we can't rely on flex-end */
	.navbox-div-group {
		text-align: right;
	}
	
	.navbox-div-main {
		display: flex;
	}
	
	.navbox-div-image,
	.navbox-div-leftimage {
		align-self: center;
	}
	
	.navbox-div-image {
		padding-left: 2px;
	}
	
	.navbox-div-leftimage {
		padding-right: 2px;
	}
	
	.navbox-div-lists {
		grid-template-columns: auto 1fr;
		flex: 1;
		align-items: stretch;
	}
	
	.navbox-div-list-groupless {
		grid-column: 1/3;
		justify-content: center;
	}
	
	.navbox-div-lists > div {
		display: flex;
		align-items: center;
	}
	
	.navbox-div-subgroup {
		flex: 1;
		margin: 0 -0.25em; /* match padding of lists above */
	}
	
	.navbox-div-subgroup .navbox-div-list-groupless {
		justify-content: flex-start;
	}
}