diff --git a/CHANGELOG.md b/CHANGELOG.md index e81f115..b8b587f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ - 优化用户头像样式 - 优化 Issue/PR/Diff/Actions 的三点菜单按钮样式 - 优化用户动态样式 +- 优化仓库发布页面样式 +- 同步字符提示的提示框动画 ### 🐞 Fix diff --git a/src/core/theme.ts b/src/core/theme.ts index 4e8641c..45dc5c5 100644 --- a/src/core/theme.ts +++ b/src/core/theme.ts @@ -6,6 +6,8 @@ import type { MapLeafNodes, WithOptionalLayer } from "./types"; export type Theme = WithOptionalLayer>; +export const overlayAppear = "overlay-appear"; +export const animation = `200ms cubic-bezier(0.33, 1, 0.68, 1) 0s 1 normal none running ${overlayAppear}`; export const overlayAppearDown = "overlay-appear-down"; export const animationDown = `200ms cubic-bezier(0.33, 1, 0.68, 1) 0s 1 normal none running ${overlayAppearDown}`; export const overlayAppearUp = "overlay-appear-up"; diff --git a/styles/public/animation.ts b/styles/public/animation.ts index e0f96f9..fa470df 100644 --- a/styles/public/animation.ts +++ b/styles/public/animation.ts @@ -1,7 +1,16 @@ -import { overlayAppearDown, overlayAppearUp } from "src/core/theme"; +import { overlayAppear, overlayAppearDown, overlayAppearUp } from "src/core/theme"; import { css } from "src/types/vars"; export const keyframe = css` + // 出现动画 + @keyframes ${overlayAppear} { + 0% { + opacity: 0; + } + 100% { + opacity: 1; + } + } // 向下出现动画 @keyframes ${overlayAppearDown} { 0% { diff --git a/styles/public/tippy.ts b/styles/public/tippy.ts index 8eda702..23c3d3c 100644 --- a/styles/public/tippy.ts +++ b/styles/public/tippy.ts @@ -1,4 +1,4 @@ -import { animationDown } from "src/core/theme"; +import { animation, animationDown } from "src/core/theme"; import { css, otherThemeVars, themeVars } from "src/types/vars"; // 一些界面内的提示框, 比如克隆按钮, PR信息, Runner信息 等 @@ -43,6 +43,7 @@ export const tippyBox = css` } // 专门用于提示信息的提示框, 比如提交的具体时间, 任务状态等 &[data-theme="tooltip"] { + animation: ${animation}; .tippy-content { font-size: 12px; font-weight: 400;