From 823e17e5ba73c0d369283c3634dea7a90ddaeccc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=87=E5=A4=A9?= Date: Wed, 4 Sep 2019 14:48:27 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96icon=E7=9A=84is=E8=B5=8B?= =?UTF-8?q?=E5=80=BC;=E4=BC=98=E5=8C=96button=E7=9A=84=E7=84=A6=E7=82=B9?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F;layer=E5=A2=9E=E5=8A=A0notify=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/form/button.wc | 15 ++++-- src/icon/index.wc | 1 + src/layer/core.wc | 130 +++++++++++++++++++++++++++++++-------------- 3 files changed, 102 insertions(+), 44 deletions(-) diff --git a/src/form/button.wc b/src/form/button.wc index 4690d06..36d10a1 100644 --- a/src/form/button.wc +++ b/src/form/button.wc @@ -11,6 +11,7 @@ display: inline-block; min-width: 64px; height: 32px; + border-radius: 4px; user-select: none; -moz-user-select: none; color: nth($cd, 2); @@ -26,7 +27,7 @@ padding: 0 5px; margin: auto; border: 1px solid nth($cp, 3); - border-radius: 4px; + border-radius: inherit; white-space: nowrap; background: #fff; font-size: inherit; @@ -41,6 +42,7 @@ &:active { border-color: nth($cgr, 1); } + &::-moz-focus-inner { border: none; } @@ -52,14 +54,14 @@ } } -:host([round]) button { +:host([round]) { border-radius: 21px; } :host([circle]) { min-width: 32px; + border-radius: 50%; button { padding: 0; - border-radius: 50%; } .icon { margin-right: 0; @@ -230,6 +232,13 @@ :host([color='grey'][disabled]) button { background: nth($cgr, 1); } + +:host(:focus-within) { + box-shadow: 0 0 3px nth($ct, 1); +} +:host(:focus-within[disabled]) { + box-shadow: 0 0 3px nth($co, 1); +}