@use "../variables/default" as vd;
@use "../functions/theme" as ft;

/**
 * reset
 */
html {
	width: 100%;
	height: 100%;
}

body {
	width: 100%;
	font-family: "Microsoft YaHei", "微软雅黑", "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", Arial, sans-serif;
	font-size: ft.themefix(font-size-default);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	line-height: ft.themefix(line-height-default);
	color: ft.themefix(color-default);
	background-color: ft.themefix(background-color-default);
}

@if vd.$allow-asterisk-wildcard {
	*,
	*::before,
	*::after {
		padding: 0;
		margin: 0;
		border: none;
		box-sizing: border-box;
	}
}

/**
 * g-reset
 * 用户初始化元素的类
 */
#{vd.$computed-prefix}reset {
	ol,
	ul,
	li {
		list-style: none;
	}

	a {
		text-decoration: none;

		&,
		&:visited,
		&:hover {
			color: inherit;
		}
	}

	img {
		vertical-align: middle;
	}

	.inline {
		display: inline;
	}

	i,
	b,
	span {
		font-style: normal;
		font-weight: normal;
	}

	input,
	textarea {
		outline: none;
	}

	button {
		outline-style: none;
	}
}

/**
 * g-unset 避免富文本被其他第三方初始化
 */
#{vd.$computed-prefix}unset {
	@if vd.$allow-asterisk-wildcard {
		*,
		*::before,
		*::after {
			padding: unset;
			margin: unset;
		}
	}

	h1,
	h2,
	h3,
	h4,
	h5,
	h6 {
		margin-top: unset;
		margin-bottom: unset;
		font-weight: unset;
		color: unset;
	}

	p {
		margin-top: unset;
		margin-bottom: unset;
	}

	li {
		display: list-item;
	}

	ol {
		display: block;
		padding-left: 40px;
		margin: 1em 0;
		list-style-type: decimal;
	}

	ul {
		display: block;
		padding-left: 40px;
		margin: 1em 0;
		list-style-type: disc;
	}
}
