Skip to content

Commit 38eb3ed

Browse files
Use bootstrap scss
1 parent f9e045c commit 38eb3ed

8 files changed

Lines changed: 277 additions & 89 deletions

File tree

packages/common/src/buildUtil/vitePreactAlias.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
export const vitePreactAlias = {
44
"react-dom/test-utils": "preact/test-utils",
55
"react-dom": "preact/compat",
6+
"react/jsx-dev-runtime": "preact/jsx-runtime",
67
"react/jsx-runtime": "preact/jsx-runtime",
78
react: "preact/compat",
89
};

packages/cursorless-org-docs/babel.config.mjs

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

packages/cursorless-org-docs/docusaurus.config.mts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,13 +154,13 @@ const config: Config = {
154154
],
155155
},
156156
theme: {
157-
customCss: [require.resolve("./src/css/custom.css")],
157+
customCss: [require.resolve("./src/css/custom.scss")],
158158
},
159159
},
160160
],
161161
],
162162

163-
plugins: ["./src/plugins/scope-tests-plugin.ts"],
163+
plugins: ["docusaurus-plugin-sass", "./src/plugins/scope-tests-plugin.ts"],
164164

165165
themeConfig: {
166166
navbar: {

packages/cursorless-org-docs/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
"@mdx-js/react": "^3.1.1",
5252
"bootstrap": "^5.3.8",
5353
"clsx": "^2.1.1",
54+
"docusaurus-plugin-sass": "^0.2.6",
5455
"mdast-util-find-and-replace": "^3.0.2",
5556
"prism-react-renderer": "^2.4.1",
5657
"react": "^19.2.4",
@@ -65,6 +66,7 @@
6566
"@tsconfig/docusaurus": "^2.0.9",
6667
"@types/mdast": "^4.0.4",
6768
"@types/react": "^19.2.14",
69+
"sass": "^1.93.2",
6870
"typescript": "^5.9.3",
6971
"unified": "^11.0.5"
7072
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
@use "sass:map";
2+
3+
@import "bootstrap/scss/functions";
4+
@import "bootstrap/scss/variables";
5+
@import "bootstrap/scss/variables-dark";
6+
@import "bootstrap/scss/maps";
7+
@import "bootstrap/scss/mixins";
8+
@import "bootstrap/scss/root";
9+
@import "bootstrap/scss/utilities";
10+
@import "bootstrap/scss/utilities/api";
11+
12+
@import "bootstrap/scss/forms/form-select";
13+
@import "bootstrap/scss/card";
14+
15+
@import "./github-link";
16+
17+
[data-theme="dark"] .dark-mode-invert {
18+
filter: invert(90%) hue-rotate(180deg);
19+
}
20+
21+
[data-theme="light"] .light-mode-invert {
22+
filter: invert(90%) hue-rotate(180deg);
23+
}
24+
25+
.pointer {
26+
cursor: pointer;
27+
}
Lines changed: 0 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,3 @@
1-
@import "bootstrap/dist/css/bootstrap.min.css";
2-
3-
/* Undo some of the global bootstrap styles */
4-
5-
:root {
6-
--bs-body-color: var(--ifm-text-color);
7-
--bs-body-bg: var(--ifm-background-color);
8-
--bs-body-line-height: var(--ifm-line-height-base);
9-
}
10-
11-
.navbar {
12-
--bs-navbar-padding-x: var(--ifm-navbar-padding-horizontal);
13-
--bs-navbar-padding-y: var(--ifm-navbar-padding-vertical);
14-
}
15-
16-
a {
17-
text-decoration: var(--ifm-link-decoration);
18-
}
19-
20-
code {
21-
color: inherit;
22-
}
23-
24-
h1,
25-
h2,
26-
h3,
27-
h4,
28-
h5,
29-
h6 {
30-
font-weight: var(--ifm-heading-font-weight);
31-
}
32-
331
/* From https://github.com/facebook/docusaurus/blob/cc0bceab9c1678303f6237f5526753edc1b12fc3/website/src/css/custom.css#L70-L86 */
342
.header-github-link:hover {
353
opacity: 0.6;
@@ -48,37 +16,3 @@ h6 {
4816
background: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='white' d='M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E")
4917
no-repeat;
5018
}
51-
52-
[data-theme="dark"] .dark-mode-invert {
53-
filter: invert(90%) hue-rotate(180deg);
54-
}
55-
56-
[data-theme="light"] .light-mode-invert {
57-
filter: invert(90%) hue-rotate(180deg);
58-
}
59-
60-
.hidden {
61-
display: none;
62-
}
63-
64-
.card {
65-
border: 1px solid var(--ifm-color-emphasis-300);
66-
margin-bottom: 1rem;
67-
}
68-
69-
.card > .card__header {
70-
border-bottom: 1px solid var(--ifm-color-emphasis-300);
71-
padding-bottom: 1rem;
72-
}
73-
74-
.pointer {
75-
cursor: pointer;
76-
}
77-
78-
/* list-style is set to none for some reason. This restores default. */
79-
ul {
80-
list-style: disc;
81-
}
82-
ol {
83-
list-style: decimal;
84-
}

packages/cursorless-org-docs/src/docs/contributing/MissingLanguageScopes.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ function RenderFacets({
9797
}
9898

9999
return (
100-
<div className="card__body">
100+
<div className="card-body">
101101
<ul>
102102
{facets.map((scope) => {
103103
return <li key={scope}>{scope}</li>;
@@ -109,7 +109,7 @@ function RenderFacets({
109109

110110
return (
111111
<div className={"card" + (open ? " open" : "")}>
112-
<div className="card__header pointer" onClick={() => setOpen(!open)}>
112+
<div className="card-header pointer" onClick={() => setOpen(!open)}>
113113
{title} ({facets.length})
114114
</div>
115115

0 commit comments

Comments
 (0)