@use "sass:map";
@use 'sass:meta';
@use "../functions/index" as fi;

/**
 * 项目主题采用CSS Variables
 * 1. 兼容问题暂不考虑，如需处理引入一段js，强制样式为指定值
 *
 * 如primary-color: *
 * 不要设置--black: black; 这是具体色值，即具体值移入./color.scss
 *
 * 命名规则：新的分类 -> *-default, *-xx
 *
 * 主题相关请使用../functions/theme.scss下的 themefix(value)
 * 	这样可以在allow-css-variables
 * 		为false时使用具体数值
 * 		为true时使用会转化为var(--value)
 */
$theme: (
	color-default: #515a6e,
	color-highlight: #5495f6,
	color-info: #0177de,
	color-success: #00a854,
	color-error: #f04134,
	color-warning: #ffbf00,

	// 背景颜色
	background-color-default: #f5f6fa,
	background-color-highlight: #5495f6,

	// 圆角
	border-radius-default: fi.unitfix(8),
	border-shadow-default: 0 0 fi.unitfix(8) 0 rgba(0, 0, 0, 0.1),
	border-shadow-default-top: 0 fi.unitfix(-2) fi.unitfix(10) 0 rgba(0, 0, 0, 0.08),

	// 行高
	line-height-default: 1.5,
	line-height-limit: fi.unitfix(32), // 单行文字限高

	// 边框
	border-color-default: #c9c9c9,

	// 字体尺寸
	font-size-default: fi.unitfix(14),
	font-size-large: fi.unitfix(16),

	// 滚动条
	scrollbar-track-bg-color: rgba(0, 0, 0, 0),
	scrollbar-thumb-bg-color: rgba(0, 0, 0, 0.2),
	scrollbar-track-box-shadow: inset 0 0 fi.unitfix(10) rgba(0, 0, 0, 0)
) !default;
$theme-merge-data: false !default;

@if $theme-merge-data and meta.type-of($theme-merge-data) == 'map' {
	$theme: map.merge($theme, $theme-merge-data);
}
