Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5043e7f

Browse files
committed
feat: add markdown buttons styles to VitePress theme
1 parentb15fb83 commit5043e7f

File tree

2 files changed

+44
-0
lines changed

2 files changed

+44
-0
lines changed

‎.vitepress/theme/styles/index.css‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
@import"./inline-demo.css";
55
@import"./utilities.css";
66
@import"./style-guide.css";
7+
@import"./markdown-buttons.css";
78

89
.VPHero .main {
910
padding:60px0;
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
/**
2+
* Component: Markdown Copy Buttons
3+
* -------------------------------------------------------------------------- */
4+
5+
/* 重置 markdown-copy-buttons 的 hover 样式,使用主题色 */
6+
.markdown-copy-buttonsbutton {
7+
padding:8px16px;
8+
border:1px solidvar(--vp-c-divider);
9+
background-color:var(--vp-c-bg);
10+
color:var(--vp-c-text-1);
11+
font-weight:500;
12+
}
13+
14+
.markdown-copy-buttonsbutton:hover {
15+
border-color:var(--vp-c-brand);
16+
background-color:var(--vp-c-brand);
17+
color:var(--vp-c-white);
18+
}
19+
20+
.markdown-copy-buttonsbutton:active {
21+
border-color:var(--vp-c-brand-dark);
22+
background-color:var(--vp-c-brand-dark);
23+
color:var(--vp-c-white);
24+
}
25+
26+
/* 深色模式下的样式调整 */
27+
.dark .markdown-copy-buttonsbutton {
28+
border-color:var(--vp-c-divider);
29+
background-color:var(--vp-c-bg-alt);
30+
color:var(--vp-c-text-1);
31+
}
32+
33+
.dark .markdown-copy-buttonsbutton:hover {
34+
border-color:var(--vp-c-brand-light);
35+
background-color:var(--vp-c-brand-light);
36+
color:var(--vp-c-white);
37+
}
38+
39+
.dark .markdown-copy-buttonsbutton:active {
40+
border-color:var(--vp-c-brand);
41+
background-color:var(--vp-c-brand);
42+
color:var(--vp-c-white);
43+
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp