MediaWiki:Common.css/src/content/table.scss

From Terraria Wiki
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.

/********* Tables *********/

table {
	border: 0 solid var(--theme-box-border-color);
	border-collapse: separate;
	border-spacing: 0;
	padding: 0;
	th, td {
		border: 0 solid var(--theme-border-color);
		padding: 3px 6px;
	}
	tfoot:empty, thead:empty {
		display: none;
	}
}

table.wikitable {
	color: inherit;
	background: none;
	border-collapse: collapse;
	border-color: var(--theme-border-color-accent);
	th, td {
		border-color: var(--theme-border-color-accent);
	}
	th {
		color: inherit;
		background: none;
	}
}

table.lined {
	border-top-width: 1px;
	th, td {
		border-bottom-width: 1px;
	}
}

table.cellborder {
	border-collapse: collapse;
	th, td {
		border-width: 1px;
	}
}

/* .topline, .bottomline, .noline */
table {
	tr.topline th, tr.topline td, th.topline, td.topline {
		border-top-width: 1px;
		border-top-color: var(--theme-border-color); /* this is necessary because "table.terraria td" elements have an invisible border */
	}
	tr.bottomline th, tr.bottomline td, th.bottomline, td.bottomline {
		border-bottom-width: 1px;
		border-bottom-color: var(--theme-border-color); /* this is necessary because "table.terraria td" elements have an invisible border */
	}
	tr.noline th, tr.noline td, th.noline, td.noline {
		border-width: 0;
	}
	tr.noline {
		th.topline, td.topline {
			border-top-width: 1px;
			border-top-color: var(--theme-border-color); /* this is necessary because "table.terraria td" elements have an invisible border */
		}
		th.bottomline, td.bottomline {
			border-bottom-width: 1px;
			border-bottom-color: var(--theme-border-color); /* this is necessary because "table.terraria td" elements have an invisible border */
		}
	}
}