Skip to content

Commit c1a0f96

Browse files
committed
optimize commit style
1 parent 3084a5f commit c1a0f96

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

styles/templates/repo/commit_sign_badge.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
1-
import { css, themeVars, otherThemeVars } from "src/types/vars";
1+
import { css, otherThemeVars, themeVars } from "src/types/vars";
22

33
export const commitSignBadge = css`
44
.github-theme-sha {
55
border-radius: ${otherThemeVars.border.radius};
6+
font-family:
7+
-apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji",
8+
"Segoe UI Emoji";
69
font-weight: 500;
710
padding: 0px 8px;
811
height: 26px;
12+
min-width: 85px; // 非等宽字体导致不对齐, 目前看到最大长度为 83px
913
display: flex;
1014
align-items: center;
1115
justify-content: center;

styles/templates/repo/commits_list.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { css, themeVars } from "src/types/vars";
1+
import { css, themeVars, otherThemeVars } from "src/types/vars";
22

33
const primary = "primary" as const;
44
const secondary = "secondary" as const;
@@ -19,6 +19,8 @@ export const commitsList = css`
1919
grid-template-columns: minmax(30%, 1fr) minmax(0, max-content) min-content;
2020
&:last-child {
2121
border-bottom: none;
22+
border-bottom-left-radius: ${otherThemeVars.border.radius};
23+
border-bottom-right-radius: ${otherThemeVars.border.radius};
2224
}
2325
&:hover {
2426
background-color: ${themeVars.color.hover.opaque};

0 commit comments

Comments
 (0)