MediaWiki:Common.css/src/template/crafts.scss

From Terraria Wiki
Jump to navigation Jump to search
/********* [[Template:Crafts]] *********/

/* This template no longer exists on the English Terraria Wiki but it is still
 * used on the Terraria Mods Wiki and possibly some language wikis */

/* match the appearance of table.terraria */

table.crafts { /* must be "table.crafts", ".crafts" is not enough */
	margin: 0.5em 0;
	border-spacing: 0;
	line-height: 1.5;
	border: 1px solid var(--theme-box-border-color);
	border-radius: 6px;

	table {
		border-collapse: collapse;
		border: 2px solid transparent;
	}
}

.crafts {
	caption {
		font-size: 16px;
		background: var(--theme-highlight-background);
		padding: 6px 8px;
		position: relative;
		font-weight: bold;
		white-space: nowrap;
		margin: 2px;

		> i,
		> b {
			vertical-align: middle;
		}
	}

	table th,
	table td {
		padding: 4px 8px;
		border: 1px solid var(--theme-box-border-color);
	}

	table th {
		background: var(--theme-highlight-background);
		background-clip: padding-box;
	}

	td {
		border: 0;
		padding: 2px;

		&.result,
		&.ingredients {
			white-space: nowrap;
		}

		&.result {
			.version-note {
				margin-bottom: 0.25em;
			}

			.result-note {
				margin-top: 0.25em;
			}
		}

		&.station {
			text-align: center;

			> b,
			> i {
				vertical-align: middle;
			}

			span.water {
				display: inline-block;
				vertical-align: middle;
			}
		}
	}

	&.nostation {
		th.station,
		td.station {
			display: none;
		}
	}

	.i > span,
	.note-text {
		/* itemlink default as multiline */
		line-height: 1.25;
		vertical-align: middle;
	}
}

.crafts .ingredients ul,
.crafting-ingredients > ul {
	margin: -3px 0;
	list-style: none;
}

.crafts .ingredients li,
.crafting-ingredients > ul > li {
	margin: 3px auto;
}

.recipe.compact .result-note {
	margin-left: 2px;
}