From 5a203804be881f3283a4750717a635658f5bf65b Mon Sep 17 00:00:00 2001 From: lutinglt Date: Fri, 27 Dec 2024 12:30:21 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8B=E6=8B=89=E8=8F=9C=E5=8D=95=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=E5=90=8C=E6=AD=A5=20Github?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/release.md | 2 +- src/dropdown.scss | 36 ++++++++++++++++++++++++++++++++++++ src/input.scss | 5 ++--- 3 files changed, 39 insertions(+), 4 deletions(-) diff --git a/.github/release.md b/.github/release.md index 055f548..9bb80fa 100644 --- a/.github/release.md +++ b/.github/release.md @@ -1 +1 @@ -优化设置界面折叠项的显示效果 \ No newline at end of file +下拉菜单样式同步 Github \ No newline at end of file diff --git a/src/dropdown.scss b/src/dropdown.scss index 492b14e..df15ba1 100644 --- a/src/dropdown.scss +++ b/src/dropdown.scss @@ -1,4 +1,25 @@ // Made by Luting ^-^ +// 下拉菜单动画 +@keyframes overlay-appear { + 0% { + opacity: 0; + transform: translateY(-5%); + } + + 100% { + opacity: 1; + transform: translateY(0); + } +} + +.ui.dropdown .menu { + margin-top: 3.75px !important; + border-radius: 12px !important; + overflow: hidden auto; + box-shadow: #30363d 0px 0px 0px 0.5px; + animation: 200ms cubic-bezier(0.33, 1, 0.68, 1) 0s 1 normal none running overlay-appear; +} + .ui.dropdown .menu, .branch-tag-item.active, .ui.pointing.dropdown > .menu:not(.hidden):after { @@ -29,3 +50,18 @@ } } +// 按钮菜单选项(主要为仓库) +.ui.button.dropdown .menu .item { + border-radius: var(--border-radius); + margin: 0 6px; + + &:first-of-type { + border-radius: var(--border-radius); + margin-top: 6px; + } + + &:last-of-type { + border-radius: var(--border-radius); + margin-bottom: 6px; + } +} diff --git a/src/input.scss b/src/input.scss index 9654dd8..2b922fa 100644 --- a/src/input.scss +++ b/src/input.scss @@ -17,10 +17,9 @@ textarea, .ui.form input[type='time'], .ui.form input[type='url'], .ui.selection.dropdown { - &:focus { - border-color: #1f6feb; - } + &:focus, &:focus-visible { + border-radius: var(--border-radius); border-color: #1f6feb; outline: none; box-shadow: inset 0 0 0 1px #1f6feb;