import { animationDown } from "src/core/theme"; import { css, themeVars } from "src/types/vars"; // 一些界面内的提示框, 比如克隆按钮, PR信息, Runner信息 等 export const tippyBox = css` .tippy-box { margin-top: -3px; border-radius: 12px; // 增加圆角 overflow: hidden; animation: ${animationDown}; transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1); // 添加过渡效果 // 克隆菜单和PR提示框为 default &[data-theme="default"], // 带标题的提示框 (Runner信息) &[data-theme="box-with-header"] { border: unset; box-shadow: ${themeVars.github.shadow.floating.small}; &:hover { transform: translateY(-2px); // 轻微上移效果 box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05); // 增强阴影 } } &[data-theme="default"] { border-radius: 12px; } &[data-theme="box-with-header"] { .tippy-content { background-color: ${themeVars.color.menu}; .ui.attached.header { background-color: ${themeVars.color.body}; padding: 12px 16px; // 增加内边距 font-weight: 600; // 增加字体粗细 } } } // 差异对比中文件路径行右侧的三个点菜单 &[data-theme="menu"] { .tippy-content { padding: 8px; .item { border-radius: 8px; // 增加圆角 padding: 6px 12px; // 增加内边距 transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1); // 添加过渡效果 &:hover { background-color: ${themeVars.github.control.transparent.bgColor.hover}; transform: translateX(2px); // 轻微右移效果 } } } } // 专门用于提示信息的提示框, 比如提交的具体时间, 任务状态等 &[data-theme="tooltip"] { .tippy-content { font-size: 12px; font-weight: 400; padding: 6px 12px; // 增加内边距 border-radius: 8px; // 增加圆角 background-color: ${themeVars.color.menu}; // 添加背景色 box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05); // 添加阴影 } } } `;