index.scss
4.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
// global
@import "./global.scss";
// color-ui
@import "@/static/scss/colorui.css";
// iconfont
@import "@/static/font/iconfont.css";
/* TabBar 顶部分隔线(H5 专用覆盖):用阴影替代 borderStyle 线条 */
/* #ifdef H5 */
.uni-tabbar {
box-shadow: inset 0px 1px 0px 0px #E7E7E7;
border-top: none;
}
/* #endif */
/* 页面原生导航标题字号:H5 覆盖为 18px */
/* #ifdef H5 */
.uni-page-head .uni-page-head-title {
font-size: 18px !important;
}
/* #endif */
/* 组件 uni-nav-bar 标题字号统一为 18px */
.uni-nav-bar-text {
font-size: 18px !important;
}
/* 全端覆盖 primary 按钮主色(内置 <button type="primary">) */
button[type="primary"],
.uni-button[type="primary"],
button.uni-button--primary,
.uni-btn-primary {
background-color: $theme-primary !important;
border-color: $theme-primary !important;
color: #ffffff !important;
}
/* plain 模式(仅描边) */
button[type="primary"][plain],
.uni-button[type="primary"][plain] {
background-color: transparent !important;
color: $theme-primary !important;
border-color: $theme-primary !important;
}
/* 点击态 */
button[type="primary"]:active {
background-color: $theme-primary-active !important;
}
/* uni-badge 主色 */
.uni-badge--primary,
.uni-badge-primary {
background-color: $theme-primary !important;
border-color: $theme-primary !important;
}
/* uni-tag 主色(默认填充与描边两种) */
.uni-tag--primary,
.uni-tag-primary {
background-color: $theme-primary !important;
border-color: $theme-primary !important;
color: #fff !important;
}
.uni-tag--primary.is-plain,
.uni-tag-primary.is-plain {
background-color: $theme-primary-plain-bg !important;
border-color: $theme-primary-plain-border !important;
color: $theme-primary !important;
}
/* uni-link 主色 */
.uni-link--primary,
.uni-link-primary,
.uni-link[type="primary"] {
color: $theme-primary !important;
}
/* uni-notice-bar 主色(如支持)*/
.uni-noticebar--primary,
.uni-noticebar-primary {
background-color: $theme-primary-plain-bg !important;
color: $theme-primary !important;
}
/* uni-data-checkbox 主色覆盖:default/button/tag/list 模式 */
.uni-data-checklist {
.checklist-group {
.checklist-box.is-checked {
/* default & list 多选框 */
.checkbox__inner {
border-color: $theme-primary !important;
background-color: $theme-primary !important;
}
.checkbox__inner .checkbox__inner-icon {
opacity: 1 !important;
transform: rotate(45deg) !important;
}
/* default & list 单选 */
.radio__inner {
border-color: $theme-primary !important;
}
.radio__inner .radio__inner-icon {
opacity: 1 !important;
background-color: $theme-primary !important;
}
.checklist-text {
color: $theme-primary !important;
}
/* list 模式右侧勾 */
.checklist-content .checkobx__list {
opacity: 1 !important;
border-color: $theme-primary !important;
}
}
/* button 模式选中边框与文本 */
.checklist-box.is--button.is-checked {
border-color: $theme-primary !important;
.checklist-text { color: $theme-primary !important; }
}
/* tag 模式选中填充与文本色 */
.checklist-box.is--tag.is-checked {
background-color: $theme-primary !important;
border-color: $theme-primary !important;
.checklist-text { color: #fff !important; }
}
}
}
/* uni-easyinput 图标颜色全局主题化(prefix/suffix/clear/eye 等) */
.uni-easyinput .content-clear-icon {
color: $theme-primary !important;
}
/* 表单错误态优先保持红色 */
.uni-easyinput.uni-easyinput-error .content-clear-icon {
color: #dd524d !important;
}
/* 禁用态灰色 */
.uni-easyinput .is-disabled .content-clear-icon {
color: #d5d5d5 !important;
}
/* 全局覆盖:uni-easyinput 聚焦高亮使用主题色(所有表单输入统一) */
.uni-easyinput .uni-easyinput__content.is-focused {
border-color: $theme-primary !important;
}
.uni-easyinput .uni-easyinput__content.is-focused .uni-easyinput__content-input,
.uni-easyinput .uni-easyinput__content.is-focused .uni-easyinput__content-textarea {
/* H5 支持光标颜色;小程序端不影响 */
caret-color: $theme-primary;
}