From fe190b61884b6570d4b6e65d064186bc16a861a3 Mon Sep 17 00:00:00 2001 From: _xiaotian <952822399@qq.com> Date: Wed, 1 Aug 2018 11:03:29 +0800 Subject: [PATCH] perf[login.vue]: Improve input background and cursor color (#927) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 完善inputèƒŒæ™¯å’Œå…‰æ ‡è‰²; 1.完善在Chromeæµè§ˆå™¨æ—¶ç™»é™†ç•Œé¢çš„inputæ ‡ç¾ ä½¿ç”¨è®°ä½å¯†ç 之åŽé¢œè‰²å’ŒèƒŒæ™¯ä¸ä¸€è‡´; 2.ç›®å‰çš„rgb值是 #2d3a4b 修改的rgb值是 #283443; 3.ä¿®å¤å…‰æ ‡ä½¿ç”¨Chrome记录的账å·ä¹‹åŽå˜é»‘色; 4.移除 .title-container .title é‡å¤çš„font-weight: 400; 5.ä¸ç”¨IE我们大家都是好朋å‹ï¼~ * Update index.vue --- src/views/login/index.vue | 65 +++++++++++++++++++++++---------------- 1 file changed, 39 insertions(+), 26 deletions(-) diff --git a/src/views/login/index.vue b/src/views/login/index.vue index 4d15c055..1ff3d311 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -142,36 +142,50 @@ export default { </script> <style rel="stylesheet/scss" lang="scss"> -$bg:#2d3a4b; -$light_gray:#eee; + /* ä¿®å¤input 背景ä¸åè°ƒ å’Œå…‰æ ‡å˜è‰² */ + /* Detail see https://github.com/PanJiaChen/vue-element-admin/pull/927 */ + + $bg:#283443; + $light_gray:#eee; + $cursor: #fff; -/* reset element-ui css */ -.login-container { - .el-input { - display: inline-block; - height: 47px; - width: 85%; - input { - background: transparent; - border: 0px; - -webkit-appearance: none; - border-radius: 0px; - padding: 12px 5px 12px 15px; - color: $light_gray; - height: 47px; - &:-webkit-autofill { - -webkit-box-shadow: 0 0 0px 1000px $bg inset !important; - -webkit-text-fill-color: #fff !important; + @supports (-webkit-mask: none) and (not (cater-color: $cursor)) { + .login-container .el-input input{ + color: $cursor; + &::first-line { + color: $light_gray; } } } - .el-form-item { - border: 1px solid rgba(255, 255, 255, 0.1); - background: rgba(0, 0, 0, 0.1); - border-radius: 5px; - color: #454545; + + /* reset element-ui css */ + .login-container { + .el-input { + display: inline-block; + height: 47px; + width: 85%; + input { + background: transparent; + border: 0px; + -webkit-appearance: none; + border-radius: 0px; + padding: 12px 5px 12px 15px; + color: $light_gray; + height: 47px; + caret-color: $cursor; + &:-webkit-autofill { + -webkit-box-shadow: 0 0 0px 1000px $bg inset !important; + -webkit-text-fill-color: $cursor !important; + } + } + } + .el-form-item { + border: 1px solid rgba(255, 255, 255, 0.1); + background: rgba(0, 0, 0, 0.1); + border-radius: 5px; + color: #454545; + } } -} </style> <style rel="stylesheet/scss" lang="scss" scoped> @@ -216,7 +230,6 @@ $light_gray:#eee; position: relative; .title { font-size: 26px; - font-weight: 400; color: $light_gray; margin: 0px auto 40px auto; text-align: center; -- GitLab