Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fe190b6

Browse files
xiaotiandadaPanJiaChen
authored andcommitted
perf[login.vue]: Improve input background and cursor color (PanJiaChen#927)
* 完善input背景和光标色; 1.完善在Chrome浏览器时登陆界面的input标签 使用记住密码之后颜色和背景不一致; 2.目前的rgb值是 #2d3a4b 修改的rgb值是 #283443; 3.修复光标使用Chrome记录的账号之后变黑色; 4.移除 .title-container .title 重复的font-weight: 400; 5.不用IE我们大家都是好朋友!~ * Update index.vue
1 parent 48a966f commit fe190b6

File tree

1 file changed

+39
-26
lines changed

1 file changed

+39
-26
lines changed

src/views/login/index.vue

Lines changed: 39 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -142,36 +142,50 @@ export default {
142142
</script>
143143

144144
<style rel="stylesheet/scss" lang="scss">
145-
$bg:#2d3a4b;
146-
$light_gray:#eee;
145+
/* 修复input 背景不协调 和光标变色 */
146+
/* Detail see https://github.com/PanJiaChen/vue-element-admin/pull/927 */
147+
148+
$bg:#283443;
149+
$light_gray:#eee;
150+
$cursor: #fff;
147151
148-
/* reset element-ui css */
149-
.login-container {
150-
.el-input {
151-
display: inline-block;
152-
height: 47px;
153-
width: 85%;
154-
input {
155-
background: transparent;
156-
border: 0px;
157-
-webkit-appearance: none;
158-
border-radius: 0px;
159-
padding: 12px 5px 12px 15px;
160-
color: $light_gray;
161-
height: 47px;
162-
&:-webkit-autofill {
163-
-webkit-box-shadow: 0 0 0px 1000px $bg inset !important;
164-
-webkit-text-fill-color: #fff !important;
152+
@supports (-webkit-mask: none) and (not (cater-color: $cursor)) {
153+
.login-container .el-input input{
154+
color: $cursor;
155+
&::first-line {
156+
color: $light_gray;
165157
}
166158
}
167159
}
168-
.el-form-item {
169-
border: 1px solid rgba(255, 255, 255, 0.1);
170-
background: rgba(0, 0, 0, 0.1);
171-
border-radius: 5px;
172-
color: #454545;
160+
161+
/* reset element-ui css */
162+
.login-container {
163+
.el-input {
164+
display: inline-block;
165+
height: 47px;
166+
width: 85%;
167+
input {
168+
background: transparent;
169+
border: 0px;
170+
-webkit-appearance: none;
171+
border-radius: 0px;
172+
padding: 12px 5px 12px 15px;
173+
color: $light_gray;
174+
height: 47px;
175+
caret-color: $cursor;
176+
&:-webkit-autofill {
177+
-webkit-box-shadow: 0 0 0px 1000px $bg inset !important;
178+
-webkit-text-fill-color: $cursor !important;
179+
}
180+
}
181+
}
182+
.el-form-item {
183+
border: 1px solid rgba(255, 255, 255, 0.1);
184+
background: rgba(0, 0, 0, 0.1);
185+
border-radius: 5px;
186+
color: #454545;
187+
}
173188
}
174-
}
175189
</style>
176190

177191
<style rel="stylesheet/scss" lang="scss" scoped>
@@ -216,7 +230,6 @@ $light_gray:#eee;
216230
position: relative;
217231
.title {
218232
font-size: 26px;
219-
font-weight: 400;
220233
color: $light_gray;
221234
margin: 0px auto 40px auto;
222235
text-align: center;

0 commit comments

Comments
 (0)