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

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

.dotlist {
	margin: auto;
	> .title {
		font-weight: bold;

		&::after {
			content: "";
			display: inline-block;
			width: 0.25em;
		}
	}

	&.nobold > .title {
		font-weight: normal;
	}

	> ul {
		display: inline;
		list-style: none;
		margin: auto; /* please don't delete this line, we need it to remove default ul margin setting. */

		> li {
			display: inline-block;

			&::after {
				content: "•";
				padding: 0 0.25em;
				word-break: break-all;
			}

			&:last-child::after {
				display: none;
			}
		}
	}

	&.nodot > ul > li::after {
		content: "\3000";
		padding: 0;
		margin: 0;
	}

	&.inline {
		display: inline;

		> ul > li {
			display: inline;
		}
	}

	@mixin space($sizefactor) {
		> .title {
			margin-right: 0.4em * $sizefactor;
		}

		> ul > li::after {
			margin-left: 0.25em * $sizefactor;
			margin-right: 0.25em * $sizefactor;
		}
	}

	&.l {
		@include space(1);
	}

	&.xl {
		@include space(2);
	}

	&.xxl {
		@include space(3);
	}

	&.xxxl {
		@include space(4);
	}

	&.xxxxl {
		@include space(5);
	}
}