Skip to content

Commit eb0fe1c

Browse files
authored
fix(plugin-llms): support dark mode (#2455)
1 parent 2b49314 commit eb0fe1c

File tree

5 files changed

+19
-16
lines changed

5 files changed

+19
-16
lines changed

e2e/fixtures/nav-link-items-without-suffix/index.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ test.describe('Nav should functions well', async () => {
2222
// ElementHandler is currently discouraged by official
2323
// use Locator instead
2424
// Please refer to https://playwright.dev/docs/api/class-elementhandle
25+
await page.waitForSelector('.rspress-nav-menu');
26+
2527
_navMenu = page.locator('.rspress-nav-menu');
2628
navMenuItems = await page.locator('.rspress-nav-menu > *').all();
2729

e2e/fixtures/package-manager-tabs/index.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ test.describe('tabs-component test', async () => {
2020
test('Index page', async ({ page }) => {
2121
await page.goto(`http://localhost:${appPort}`);
2222

23+
await page.waitForSelector('[class^="tab_"] > div > span');
2324
const tabs = await page.$$('[class^="tab_"] > div > span');
2425
const tabsText = await Promise.all(
2526
tabs.map(element => element.textContent()),

packages/plugin-llms/src/runtime/LlmsCopyButton.module.scss

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
gap: 8px;
88

99
border-radius: 8px;
10-
border: 1px solid #e5e6eb;
11-
background: #fff;
10+
border: 1px solid var(--rp-c-divider-light);
11+
background: var(--rp-c-bg);
12+
color: var(--rp-c-text-1);
1213

13-
color: rgba(0, 0, 0, 0.9);
1414
font-size: 14px;
1515
font-style: normal;
1616
font-weight: 400;
@@ -20,12 +20,10 @@
2020
border 0.3s ease,
2121
opacity 0.3s ease;
2222
&:hover {
23-
background: #f5f5f5;
24-
border: 1px solid #e5e6eb;
23+
background: var(--rp-c-bg-mute);
2524
}
2625
&.loading {
27-
background: #f5f5f5;
28-
border: 1px solid #e5e6eb;
26+
background: var(--rp-c-bg-mute);
2927
opacity: 0.5;
3028
}
3129
&.success {

packages/plugin-llms/src/runtime/LlmsViewOptions.module.scss

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
gap: 8px;
88

99
border-radius: 8px;
10-
border: 1px solid #e5e6eb;
11-
background: #fff;
10+
border: 1px solid var(--rp-c-divider-light);
11+
background: var(--rp-c-bg);
12+
color: var(--rp-c-text-1);
1213

13-
color: rgba(0, 0, 0, 0.9);
1414
font-size: 14px;
1515
font-style: normal;
1616
font-weight: 400;
@@ -20,10 +20,10 @@
2020
background 0.3s ease,
2121
border 0.3s ease;
2222
&:hover {
23-
background: #f5f5f5;
23+
background: var(--rp-c-bg-mute);
2424
}
2525
&.active {
26-
background: #f5f5f5;
26+
background: var(--rp-c-bg-mute);
2727
}
2828
}
2929

@@ -54,8 +54,10 @@
5454
align-items: flex-start;
5555

5656
border-radius: 8px;
57-
border: 1px solid #e5e6eb;
58-
background: #fff;
57+
border: 1px solid var(--rp-c-divider-light);
58+
background: var(--rp-c-bg);
59+
color: var(--rp-c-text-1);
60+
5961
box-shadow: 0 4px 16px 0 rgba(0, 0, 0, 0.04);
6062
}
6163

@@ -73,7 +75,7 @@
7375
border-radius: 8px;
7476

7577
&:hover {
76-
background: #f5f5f5;
78+
background: var(--rp-c-bg-mute);
7779
}
7880
}
7981

packages/plugin-llms/src/runtime/LlmsViewOptions.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ const LlmsViewOptions = ({
163163
>
164164
<g
165165
fill="none"
166-
stroke="black"
166+
stroke="currentColor"
167167
strokeLinecap="round"
168168
strokeLinejoin="round"
169169
strokeWidth="2"

0 commit comments

Comments
 (0)