Skip to content

Commit fe25a25

Browse files
fix(docs): refactor search-widget styles to use minimal theme CSS (#6092)
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: [email protected] <[email protected]> Co-authored-by: Sahil <[email protected]>
1 parent 16b3c22 commit fe25a25

File tree

8 files changed

+445
-39
lines changed

8 files changed

+445
-39
lines changed

packages/search-widget/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@
7878
"lucide-react": "^0.460.0",
7979
"mini-css-extract-plugin": "^2.9.4",
8080
"postcss-loader": "^8.2.0",
81+
"postcss-nesting": "^13.0.2",
8182
"react-instantsearch": "^7.15.5",
8283
"react-markdown": "^9.0.1",
8384
"sass": "^1.97.0",
Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1+
import postcssNesting from "postcss-nesting";
2+
13
export default {
24
// This is duplicated, make sure to keep it in sync with others
3-
plugins: {
4-
"@tailwindcss/postcss": {},
5-
...(process.env.NODE_ENV === "production" ? { cssnano: {} } : {})
6-
}
5+
plugins: [postcssNesting(), "@tailwindcss/postcss", ...(process.env.NODE_ENV === "production" ? ["cssnano"] : [])]
76
};

packages/search-widget/src/components/search.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import { useApiRoute } from "@/hooks/useApiRoute";
1919
import { searchDialogOpenAtom, useConversationId } from "@/state/search";
2020
import { generateQueryId } from "@/utils/generateQueryId";
2121

22-
import "../styles/desktop.scss";
22+
import "../styles/search-modal.scss";
2323
import { atomWithStorageString } from "../utils/atomWithStorageString";
2424

2525
const SEARCH_INDEX = "fern_docs_search";

packages/search-widget/src/styles/desktop.scss

Lines changed: 0 additions & 5 deletions
This file was deleted.

packages/search-widget/src/styles/fern-accent.scss

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,33 @@
11
:root {
2-
--color-background: #fbfffa;
3-
--accent-1: #f9fdf8;
4-
--accent-2: #f3faf2;
5-
--accent-3: #e4f6e3;
6-
--accent-4: #d4f1d3;
7-
--accent-5: #c0eabf;
8-
--accent-6: #a8dfa6;
9-
--accent-7: #86d185;
10-
--accent-8: #4fbc52;
11-
--accent-9: #1ba32a;
12-
--accent-10: #009618;
13-
--accent-11: #00810c;
14-
--accent-12: #1a3e1b;
15-
--accent-a1: #51555003;
16-
--accent-a2: #19721809;
17-
--accent-a3: #07a00618;
18-
--accent-a4: #03a60228;
19-
--accent-a5: #05a8043d;
20-
--accent-a6: #05a10156;
21-
--accent-a7: #039e0278;
22-
--accent-a8: #009e06af;
23-
--accent-a9: #009812e4;
24-
--accent-a10: #009618;
25-
--accent-a11: #00810c;
26-
--accent-a12: #002802e5;
27-
--accent-contrast: #fff;
28-
--accent-surface: #f1f9f0cc;
29-
--accent-indicator: #1ba32a;
30-
--accent-track: #1ba32a;
2+
--color-background: var(--widget-color-background, #fbfffa);
3+
--accent-1: var(--widget-accent-1, #f9fdf8);
4+
--accent-2: var(--widget-accent-2, #f3faf2);
5+
--accent-3: var(--widget-accent-3, #e4f6e3);
6+
--accent-4: var(--widget-accent-4, #d4f1d3);
7+
--accent-5: var(--widget-accent-5, #c0eabf);
8+
--accent-6: var(--widget-accent-6, #a8dfa6);
9+
--accent-7: var(--widget-accent-7, #86d185);
10+
--accent-8: var(--widget-accent-8, #4fbc52);
11+
--accent-9: var(--widget-accent-9, #1ba32a);
12+
--accent-10: var(--widget-accent-10, #009618);
13+
--accent-11: var(--widget-accent-11, #00810c);
14+
--accent-12: var(--widget-accent-12, #1a3e1b);
15+
--accent-a1: var(--widget-accent-a1, #51555003);
16+
--accent-a2: var(--widget-accent-a2, #19721809);
17+
--accent-a3: var(--widget-accent-a3, #07a00618);
18+
--accent-a4: var(--widget-accent-a4, #03a60228);
19+
--accent-a5: var(--widget-accent-a5, #05a8043d);
20+
--accent-a6: var(--widget-accent-a6, #05a10156);
21+
--accent-a7: var(--widget-accent-a7, #039e0278);
22+
--accent-a8: var(--widget-accent-a8, #009e06af);
23+
--accent-a9: var(--widget-accent-a9, #009812e4);
24+
--accent-a10: var(--widget-accent-a10, #009618);
25+
--accent-a11: var(--widget-accent-a11, #00810c);
26+
--accent-a12: var(--widget-accent-a12, #002802e5);
27+
--accent-contrast: var(--widget-accent-contrast, #fff);
28+
--accent-surface: var(--widget-accent-surface, #f1f9f0cc);
29+
--accent-indicator: var(--widget-accent-indicator, #1ba32a);
30+
--accent-track: var(--widget-accent-track, #1ba32a);
3131
}
3232

3333
@supports (color: color(display-p3 1 1 1)) {

0 commit comments

Comments
 (0)