MediaWiki:Common.less/calculators.less

De RuneScape Wiki
Ir para: navegação, pesquisa
.calc-container {
	display: block;
	min-width: 100%;
	width: 100%;
	max-width: 100%;
	margin-top: -52px;
	column-count: auto;
	column-width: 491px;
	column-fill: balance;
	column-gap: 52px;
	column-rule: dashed 1px rgba(137, 142, 152, 0.1);

	.calc-tile-divider:first-child {
		margin-bottom: 0px;
	}

}

body.wgl-stickyheader {

	.calc-container {
		margin-top: -92px;
	}

	.calc-sticky .calc-section-header {
		top: 40px;
	}

	.calc-tile-divider {
		margin-bottom: -92px;
	}

	.calc-tile-container {
		padding-top: 118px;
	}

	.calc-header-title {

		> h2 {
			grid-template-rows: 0px 172px;
			margin-top: -117px !important;
			height: 172px;

			> span {
				grid-template-rows: 117px 55px;
			}

		}

	}

}

.calc-section-header {
	position: relative;
	top: 0px;
	padding-top: 1em;
	background: #fbfbfb;
	z-index: 5;

	> h1 {
		margin-top: 0;
		margin-bottom: 0;
	}

}

.calc-sticky .calc-section-header {
	position: sticky !important;
}

.calc-toc {
	padding-top: 13px;
	padding-bottom: 13px;
}

.calc-toc-section {
	position: relative;
	display: grid;
	grid-template-columns: 144px 1fr;
	margin-bottom: 0px;

	> p {
		grid-column-start: 1;
		grid-column-end: span 1;
		margin: 0;
		line-height: 34px;
		text-align: right;
		padding-right: 21px;
		font-size: 1.0em;
		font-weight: bold;
	}

}

.calc-toc-dots {
	position: absolute;
	top: 34px;
	bottom: 26px;
	right: 0px;
	grid-column-start: 1;
	grid-column-end: span 1;
	border-right: 1px dotted #cccccc;
	text-align: right;
	margin-right: 29px;
}

.calc-toc-list {
	grid-column-start: 2;
	grid-column-end: span 1;
	padding: 0;
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	justify-content: left;
}

.calc-toc-list-item {
	position: relative;
	min-width: 193px;
	width: 193px;
	max-width: 193px;
	height: 34px;
	margin-right: 8px;
	margin-bottom: 8px;
	line-height: 34px;
	padding-left: 34px;
	padding-right: 6px;
	color: #ffffff;
	text-shadow: 1px 1px #0006;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;

	> a {
		position: absolute;
		top: 0;
		left: 0;
		right: 0;
		bottom: 0;
	}

	> img {
		position: absolute;
		top: 6.5px;
		left: 6.5px;
		width: 21px;
		height: 21px;
	}

}

.calc-tile-divider {
	margin-bottom: -52px;
}

.calc-tile-container {
	display: inline-block;
	-webkit-column-break-inside: avoid;
	page-break-inside: avoid;
	break-inside: avoid;
	padding: 0;
	padding-top: 78px;
	padding-bottom: 0.25rem;
	background: none !important;
	width: calc(100% - 2px);
}

@supports ( break-inside: avoid-column ) {

	.calc-tile-container {
		display: block;
	}

}

/* Header title */
.calc-header-title {
	text-shadow: 1px 1px #0006;
	height: 55px;
	margin-left: 5px;
	grid-column-start: 2;
	grid-column-end: span 1;
	min-width: 0;
	color: rgba(255, 255, 255, 0.9);
	z-index: inherit;

	> h2 {
		color: inherit !important;
		padding: 0;
		margin: 0;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
		font-size: 21px;
		line-height: 55px;
		display: grid;
		grid-template-rows: 0px 132px;
		margin-top: -77px !important;
		height: 132px;

		> span {
			display: inline-grid;
			grid-template-rows: 77px 55px;
			height: 0px;
			grid-row-start: 1;
			grid-row-end: span 1;

			> span {
				grid-row-start: 2;
				grid-row-end: span 1;
			}

		}

		> .mw-headline-headanchor {
			grid-row-start: 1;
			grid-row-end: span 1;
		}

	}

}

.calc.tile {
	position: relative;
	margin: 0;
	padding: 0;
	min-width: 100%;
	height: unset;
	z-index: 0;
}

/* Keyword styling */
.calc .keyword {
		font-size: 1.125em;
		font-weight: bold;
}

/* Header */
.calc-header {
	grid-column-start: 1;
	grid-column-end: span 2;
	grid-row-start: 1;
	grid-row-end: span 1;
	display: grid;
	grid-template-columns: 55px minmax(0, max-content) max-content 1fr 68px;
	position: relative;
	top: 0;
	width: 100%;
	height: 55px;
	// this makes the headers on all columns except the first disappear in Safari
	// maybe put this back in later when it gets fixed
	// overflow: hidden;
	background: transparent;
	z-index: 2;
}

/* Header background */
.calc-header-background {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: 1;

	> img {
		position: absolute;
		top: 0;
		bottom: 0;
		left: 0;
		right: 0;
	}

}

/* Header icon */
.calc-header-icon {
	grid-column-start: 1;
	grid-column-end: span 1;
	min-width: 55px;
	width: 55px;
	max-width: 55px;
	min-height: 55px;
	height: 55px;
	max-height: 55px;
	z-index: inherit;

	> img {
		object-fit: contain;
		min-width: 25px;
		width: 25px;
		max-width: 25px;
		min-height: 25px;
		height: 25px;
		max-height: 25px;
		padding: 15px;
	}

}

/* Semantic sugar to make the TOC look pretty, since both the desktop and mobile titles appear in the table, regardless of current visibility */
.calc-header-title-semantics {
	display: none;
}

/* Header in-game command */
.calc-header-command {
	margin-left: 10px;
	grid-column-start: 3;
	grid-column-end: span 1;
	height: 55px;
	line-height: 55px;
	z-index: inherit;
}

/* List container */
.calc-list {
	grid-column-start: 1;
	grid-column-end: span 2;
	grid-row-start: 2;
	grid-row-end: span 1;
	padding: 0px;
	padding-top: 4px;
	padding-bottom: 5.5px;
}

.calc-list-item {
	position: relative;
	display: grid;
	grid-template-columns: [thumb] min-content [main] 1fr [key] max-content;
	grid-template-rows: min-content min-content;
	width: auto;
	padding: 8.5px;
	margin: 0;
	border-bottom: 1px solid rgba(137, 142, 152, 0.075);

	&:last-child {
		border-bottom-color: transparent;
	}

}

.calc-list-item-thumbnail {
	grid-column-start: thumb;
	grid-column-end: span 1;
	grid-row-start: 1;
	grid-row-end: span 2;
	margin-left: 5.5px;
	width: 44px;
	height: 52.8px;
	margin-right: 14px;
	padding-top: 8.5px;

	> img {
		min-width: 44px;
		width: 44px !important;
		max-width: 44px;
		min-height: 44px;
		height: 44px !important;
		max-height: 44px;
		object-fit: contain;
		object-position: center 0;
		grid-row-start: 2;
		grid-row-end: span 1;
	}

}

/* List item type icon */
.calc-list-item-key {
	width: 28px;
	grid-column-start: key;
	grid-column-end: span 1;
	grid-row-start: 1;
	grid-row-end: span 1;
	margin-left: 8.5px;

	> img {
		position: absolute;
		top: 8.5px;
		right: 8.5px;
	}

}

/* List item title */
.calc-list-item-title {
	grid-column-start: main;
	grid-column-end: span 1;
	grid-row-start: 1;
	grid-row-end: span 1;
	padding-left: 8px;
	text-indent: -8px;
}

/* List item description */
.calc-list-item-desc {
	grid-column-start: main;
	grid-column-end: span 1;
	grid-row-start: 2;
	grid-row-end: span 1;
	margin-left: 8px;
	text-indent: 0px;
}