Skip to content

Build your personal knowledge base with Trilium Notes

refactor(share-theme): group each part's script and stylesheet

Elian Dorandab5d8ec9cd5
diff --git a/packages/share-theme/README.md b/packages/share-theme/README.md
index 838f3eaaf4..6b38724acf 100644
--- a/packages/share-theme/README.md
+++ b/packages/share-theme/README.md
@@ -3,6 +3,7 @@
The default theme for [shared notes](../../docs/User%20Guide/User%20Guide/Advanced%20Usage/Sharing.md) and for the static HTML export. It started as the theme of [trilium.rocks](https://trilium.rocks) by [Zerebos](https://github.com/zerebos).
- `src/templates/` — the EJS templates. `packages/trilium-core/src/share/content_renderer.ts` renders them on the server; a note can replace `page.ejs` with its own through `~shareTemplate`.
-- `src/scripts/` and `src/styles/` — the client-side script and stylesheet every shared page loads.
+- `src/page/` — the parts of the page around the note (layout, header, navigation tree, search, table of contents, footer), and `src/content/` — the styles and enhancements for the note's own content (math, Mermaid, link embeds, adaptive colors). A part's script and stylesheet share a name and a folder: `toc.ts`, `toc.css`.
+- `src/index.ts` and `src/index.css` — the two entry points. `index.ts` sets every script up; `index.css` imports every stylesheet, and its order is the cascade order.
-`pnpm --filter share-theme build` bundles the scripts and styles into `dist/`, which the server, desktop, standalone and static-export builds copy. `pnpm install` runs it, but no `*:start` script does, so rebuild after changing a script or style (or run `pnpm --filter share-theme dev` to watch).
+`pnpm --filter share-theme build` bundles them into `dist/` (`scripts.js`, `styles.css`, and `scripts.css` for the third-party styles `index.ts` imports), which the server, desktop, standalone and static-export builds copy. `pnpm install` runs it, but no `*:start` script does, so rebuild after changing a script or style (or run `pnpm --filter share-theme dev` to watch).
diff --git a/packages/share-theme/package.json b/packages/share-theme/package.json
index b7b3050c0e..0d5943b386 100644
--- a/packages/share-theme/package.json
+++ b/packages/share-theme/package.json
@@ -13,8 +13,6 @@
},
"exports": {
"./templates/*": "./src/templates/*",
- "./styles/*": "./src/styles/*",
- "./scripts/*": "./src/scripts/*",
"./*": "./dist/*"
},
"author": "Elian Doran <[email protected]>",
diff --git a/packages/share-theme/scripts/build.ts b/packages/share-theme/scripts/build.ts
index 13da1569f1..390496e310 100644
--- a/packages/share-theme/scripts/build.ts
+++ b/packages/share-theme/scripts/build.ts
@@ -25,7 +25,7 @@ function makeEntry(mod: string) {
}
return {
- "in": path.join(rootDir, "src", mod, entrypoint),
+ "in": path.join(rootDir, "src", entrypoint),
"out": mod
};
}
diff --git a/packages/share-theme/src/scripts/modules/api.ts b/packages/share-theme/src/api.ts
similarity index 100%
rename from packages/share-theme/src/scripts/modules/api.ts
rename to packages/share-theme/src/api.ts
diff --git a/packages/share-theme/src/styles/index.css b/packages/share-theme/src/base.css
similarity index 74%
rename from packages/share-theme/src/styles/index.css
rename to packages/share-theme/src/base.css
index 4bf43dd627..4b130928a4 100644
--- a/packages/share-theme/src/styles/index.css
+++ b/packages/share-theme/src/base.css
@@ -1,21 +1,3 @@
-@import "./base.css";
-@import "./childlinks.css";
-@import "./externallinks.css";
-@import "./toc.css";
-
-@import "./navbar/index.css";
-@import "./popouts/index.css";
-
-@import "./layout.css";
-@import "./content.css";
-@import "./task-states.css";
-@import "./adaptive-colors.css";
-@import "./content-footer.css";
-@import "./link-embed.css";
-
-@import "./mobile.css";
-
-
* {
box-sizing: border-box;
}
@@ -66,6 +48,11 @@ pre, code, kbd, samp {
font-family: "JetBrains Mono", Consolas, monospace;
}
+img {
+ max-width: 100%;
+}
-
-
+pre {
+ white-space: pre-wrap;
+ word-wrap: anywhere;
+}
diff --git a/packages/share-theme/src/scripts/common/debounce.ts b/packages/share-theme/src/common/debounce.ts
similarity index 100%
rename from packages/share-theme/src/scripts/common/debounce.ts
rename to packages/share-theme/src/common/debounce.ts
diff --git a/packages/share-theme/src/scripts/common/parents.ts b/packages/share-theme/src/common/parents.ts
similarity index 100%
rename from packages/share-theme/src/scripts/common/parents.ts
rename to packages/share-theme/src/common/parents.ts
diff --git a/packages/share-theme/src/scripts/common/parsehtml.ts b/packages/share-theme/src/common/parsehtml.ts
similarity index 100%
rename from packages/share-theme/src/scripts/common/parsehtml.ts
rename to packages/share-theme/src/common/parsehtml.ts
diff --git a/packages/share-theme/src/styles/adaptive-colors.css b/packages/share-theme/src/content/adaptive_colors.css
similarity index 100%
rename from packages/share-theme/src/styles/adaptive-colors.css
rename to packages/share-theme/src/content/adaptive_colors.css
diff --git a/packages/share-theme/src/styles/content.css b/packages/share-theme/src/content/content.css
similarity index 98%
rename from packages/share-theme/src/styles/content.css
rename to packages/share-theme/src/content/content.css
index 6a29b6751f..468439894a 100644
--- a/packages/share-theme/src/styles/content.css
+++ b/packages/share-theme/src/content/content.css
@@ -5,6 +5,16 @@
--ck-content-line-height: inherit !important;
}
+#title {
+ margin: 0;
+ padding-top: 10px;
+}
+
+iframe.pdf-view {
+ width: 100%;
+ height: 800px;
+}
+
.ck-content code,
.ck-content pre {
color: var(--text-primary);
diff --git a/packages/share-theme/src/styles/externallinks.css b/packages/share-theme/src/content/external_links.css
similarity index 100%
rename from packages/share-theme/src/styles/externallinks.css
rename to packages/share-theme/src/content/external_links.css
diff --git a/packages/share-theme/src/scripts/modules/favicon_contrast.ts b/packages/share-theme/src/content/favicon_contrast.ts
similarity index 96%
rename from packages/share-theme/src/scripts/modules/favicon_contrast.ts
rename to packages/share-theme/src/content/favicon_contrast.ts
index 993b5f3152..7169517b66 100644
--- a/packages/share-theme/src/scripts/modules/favicon_contrast.ts
+++ b/packages/share-theme/src/content/favicon_contrast.ts
@@ -11,7 +11,7 @@ import {
* which disappears on the dark theme, and a mark drawn white for a dark header disappears on the
* light one. Each icon's own pixels are measured (the shared logic lives in commons, so the app and
* the shared page reach the same verdict about the same picture) and the answer is left on the
- * element as a class for `link-embed.css` to act on — which is what lets the visitor's theme switch
+ * element as a class for `link_embed.css` to act on — which is what lets the visitor's theme switch
* correct the icons with nothing measured again.
*/
export default function setupFaviconContrast() {
diff --git a/packages/share-theme/src/styles/base.css b/packages/share-theme/src/content/footnotes.css
similarity index 88%
rename from packages/share-theme/src/styles/base.css
rename to packages/share-theme/src/content/footnotes.css
index 2a297602a1..68cf684bd9 100644
--- a/packages/share-theme/src/styles/base.css
+++ b/packages/share-theme/src/content/footnotes.css
@@ -1,22 +1,3 @@
-#title {
- margin: 0;
- padding-top: 10px;
-}
-
-img {
- max-width: 100%;
-}
-
-pre {
- white-space: pre-wrap;
- word-wrap: anywhere;
-}
-
-iframe.pdf-view {
- width: 100%;
- height: 800px;
-}
-
.ck-content .footnote-section {
border-top: 1px solid #c4c4c4;
border-radius: 2px;
diff --git a/packages/share-theme/src/styles/katex.scss b/packages/share-theme/src/content/katex.scss
similarity index 100%
rename from packages/share-theme/src/styles/katex.scss
rename to packages/share-theme/src/content/katex.scss
diff --git a/packages/share-theme/src/styles/link-embed.css b/packages/share-theme/src/content/link_embed.css
similarity index 100%
rename from packages/share-theme/src/styles/link-embed.css
rename to packages/share-theme/src/content/link_embed.css
diff --git a/packages/share-theme/src/scripts/modules/math.ts b/packages/share-theme/src/content/math.ts
similarity index 96%
rename from packages/share-theme/src/scripts/modules/math.ts
rename to packages/share-theme/src/content/math.ts
index 606aeee47f..c720ac6e25 100644
--- a/packages/share-theme/src/scripts/modules/math.ts
+++ b/packages/share-theme/src/content/math.ts
@@ -1,5 +1,5 @@
import { KATEX_MACROS } from "@triliumnext/commons/src/lib/katex_macros.js";
-import "../../styles/katex.scss";
+import "./katex.scss";
export default async function setupMath() {
const anyMathBlock = document.querySelector("#content .math-tex");
diff --git a/packages/share-theme/src/scripts/modules/mermaid.spec.ts b/packages/share-theme/src/content/mermaid.spec.ts
similarity index 100%
rename from packages/share-theme/src/scripts/modules/mermaid.spec.ts
rename to packages/share-theme/src/content/mermaid.spec.ts
diff --git a/packages/share-theme/src/scripts/modules/mermaid.ts b/packages/share-theme/src/content/mermaid.ts
similarity index 100%
rename from packages/share-theme/src/scripts/modules/mermaid.ts
rename to packages/share-theme/src/content/mermaid.ts
diff --git a/packages/share-theme/src/styles/task-states.css b/packages/share-theme/src/content/task_states.css
similarity index 100%
rename from packages/share-theme/src/styles/task-states.css
rename to packages/share-theme/src/content/task_states.css
diff --git a/packages/share-theme/src/scripts/modules/video_facade.ts b/packages/share-theme/src/content/video_facade.ts
similarity index 100%
rename from packages/share-theme/src/scripts/modules/video_facade.ts
rename to packages/share-theme/src/content/video_facade.ts
diff --git a/packages/share-theme/src/index.css b/packages/share-theme/src/index.css
new file mode 100644
index 0000000000..0460fc75ed
--- /dev/null
+++ b/packages/share-theme/src/index.css
@@ -0,0 +1,17 @@
+@import "./base.css";
+
+@import "./page/layout.css";
+@import "./page/header.css";
+@import "./page/navigation.css";
+@import "./page/theme_switch.css";
+@import "./page/search.css";
+@import "./page/toc.css";
+@import "./page/child_links.css";
+@import "./page/footer.css";
+
+@import "./content/content.css";
+@import "./content/footnotes.css";
+@import "./content/external_links.css";
+@import "./content/task_states.css";
+@import "./content/adaptive_colors.css";
+@import "./content/link_embed.css";
diff --git a/packages/share-theme/src/scripts/index.ts b/packages/share-theme/src/index.ts
similarity index 77%
rename from packages/share-theme/src/scripts/index.ts
rename to packages/share-theme/src/index.ts
index d9d32d0631..c352973cec 100644
--- a/packages/share-theme/src/scripts/index.ts
+++ b/packages/share-theme/src/index.ts
@@ -1,14 +1,14 @@
-import setupToC from "./modules/toc.js";
-import setupExpanders from "./modules/expanders.js";
-import setupMobileMenu from "./modules/mobile.js";
-import setupSearch from "./modules/search.js";
-import setupThemeSelector from "./modules/theme.js";
-import setupMermaid from "./modules/mermaid.js";
-import setupMath from "./modules/math.js";
-import setupSidebars from "./modules/sidebar.js";
-import setupVideoFacades from "./modules/video_facade.js";
-import setupFaviconContrast from "./modules/favicon_contrast.js";
-import api from "./modules/api.js";
+import setupToC from "./page/toc.js";
+import setupExpanders from "./page/navigation.js";
+import setupLayout from "./page/layout.js";
+import setupSearch from "./page/search.js";
+import setupThemeSelector from "./page/theme_switch.js";
+import setupMermaid from "./content/mermaid.js";
+import setupMath from "./content/math.js";
+import setupVideoFacades from "./content/video_facade.js";
+import setupFaviconContrast from "./content/favicon_contrast.js";
+import api from "./api.js";
+// These go to `scripts.css`, which the page loads after `styles.css` (built from `index.css`).
import "highlight.js/styles/default.css";
import "@triliumnext/ckeditor5/src/theme/ck-content.css";
import "@triliumnext/ckeditor5/src/theme/tabs.css";
@@ -29,9 +29,8 @@ Object.assign(window, api);
$try(setupThemeSelector);
$try(setupToC);
$try(setupExpanders);
-$try(setupMobileMenu);
+$try(setupLayout);
$try(setupSearch);
-$try(setupSidebars);
function setupTextNote() {
$try(setupMermaid);
diff --git a/packages/share-theme/src/styles/childlinks.css b/packages/share-theme/src/page/child_links.css
similarity index 100%
rename from packages/share-theme/src/styles/childlinks.css
rename to packages/share-theme/src/page/child_links.css
diff --git a/packages/share-theme/src/styles/content-footer.css b/packages/share-theme/src/page/footer.css
similarity index 100%
rename from packages/share-theme/src/styles/content-footer.css
rename to packages/share-theme/src/page/footer.css
diff --git a/packages/share-theme/src/page/header.css b/packages/share-theme/src/page/header.css
new file mode 100644
index 0000000000..41c4e910c8
--- /dev/null
+++ b/packages/share-theme/src/page/header.css
@@ -0,0 +1,48 @@
+#header {
+ background: var(--background-secondary);
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding: 6px 12px;
+ border-bottom: 1px solid var(--background-highlight);
+}
+
+#header-logo {
+ display: flex;
+ align-items: center;
+ gap: 5px;
+ font-weight: bold;
+}
+
+#header-logo img {
+ max-width: 32px;
+}
+
+.header-button {
+ color: var(--text-menu);
+ background: transparent;
+ margin: 0;
+ padding: 4px;
+ border: 0;
+ outline: 0;
+ display: flex;
+ align-items: center;
+ cursor: pointer;
+ border-radius: 6px;
+ transition: background-color 200ms ease, transform 200ms ease;
+}
+
+.header-button:hover {
+ background-color: var(--background-highlight);
+}
+
+.header-button-placeholder {
+ width: 32px;
+}
+
+@media (max-width: 48em) {
+ #header .header-button svg {
+ width: 32px;
+ height: 32px;
+ }
+}
diff --git a/packages/share-theme/src/styles/layout.css b/packages/share-theme/src/page/layout.css
similarity index 54%
rename from packages/share-theme/src/styles/layout.css
rename to packages/share-theme/src/page/layout.css
index ace13067f0..a182608bac 100644
--- a/packages/share-theme/src/styles/layout.css
+++ b/packages/share-theme/src/page/layout.css
@@ -67,3 +67,61 @@ body {
padding: 0 50px;
}
}
+
+#mobile-backdrop {
+ display: none;
+}
+
+@media (max-width: 48em) {
+ html,
+ body {
+ height: 100%;
+ }
+
+ #split-pane {
+ overflow: hidden;
+ }
+
+ #right-pane, #main {
+ width: 100%;
+ padding: 0;
+ }
+
+ #main {
+ padding: 1rem;
+ }
+
+ #left-pane {
+ position: fixed;
+ top: 0;
+ bottom: 0;
+ left: 0;
+ width: 80%;
+ max-width: 300px;
+ background: var(--background-secondary);
+ transform: translateX(-100%);
+ transition: transform 200ms ease;
+ z-index: 2;
+ overflow-y: auto;
+ }
+
+ .menu-open #left-pane {
+ transform: translateX(0);
+ }
+
+ #mobile-backdrop {
+ display: block;
+ position: fixed;
+ inset: 0;
+ background: rgba(0,0,0,0);
+ pointer-events: none;
+ transition: background-color 200ms ease;
+ z-index: 1;
+ }
+
+ body.menu-open #mobile-backdrop,
+ body.toc-open #mobile-backdrop {
+ background: rgba(0,0,0, 0.6);
+ pointer-events: auto;
+ }
+}
diff --git a/packages/share-theme/src/scripts/modules/sidebar.ts b/packages/share-theme/src/page/layout.ts
similarity index 54%
rename from packages/share-theme/src/scripts/modules/sidebar.ts
rename to packages/share-theme/src/page/layout.ts
index e56a312ff0..7029a4001c 100644
--- a/packages/share-theme/src/scripts/modules/sidebar.ts
+++ b/packages/share-theme/src/page/layout.ts
@@ -1,5 +1,25 @@
const MOBILE_BREAKPOINT = 768; // 48em
+export default function setupLayout() {
+ setupToggle("left-pane-toggle-button", "left-pane-collapsed", "menu-open", "toc-open");
+ setupToggle("toc-pane-toggle-button", "toc-pane-collapsed", "toc-open", "menu-open");
+
+ // A listener on the backdrop itself, not on `window`: iOS Safari dispatches no `click` for a
+ // tap on an element it does not consider clickable, and `window` listeners do not count.
+ document.getElementById("mobile-backdrop")?.addEventListener("click", closeMobileMenus);
+
+ // Going back to a page restored from the back/forward cache keeps the panel that was
+ // open when the user tapped a link in it.
+ window.addEventListener("pageshow", e => {
+ if (e.persisted) closeMobileMenus();
+ });
+}
+
+export function closeMobileMenus() {
+ document.body.classList.remove("menu-open");
+ document.body.classList.remove("toc-open");
+}
+
function setupToggle(buttonId: string, className: string, mobileClass: string, otherMobileClass: string) {
const button = document.getElementById(buttonId);
if (!button) return;
@@ -15,8 +35,3 @@ function setupToggle(buttonId: string, className: string, mobileClass: string, o
}
});
}
-
-export default function setupSidebars() {
- setupToggle("left-pane-toggle-button", "left-pane-collapsed", "menu-open", "toc-open");
- setupToggle("toc-pane-toggle-button", "toc-pane-collapsed", "toc-open", "menu-open");
-}
diff --git a/packages/share-theme/src/styles/navbar/navbar.css b/packages/share-theme/src/page/navigation.css
similarity index 96%
rename from packages/share-theme/src/styles/navbar/navbar.css
rename to packages/share-theme/src/page/navigation.css
index 6644c6241f..257ed9557e 100644
--- a/packages/share-theme/src/styles/navbar/navbar.css
+++ b/packages/share-theme/src/page/navigation.css
@@ -5,6 +5,12 @@
gap: 10px;
}
+#site-header {
+ display: flex;
+ flex-direction: column;
+ gap: 20px;
+}
+
#menu {
order: 1;
white-space: nowrap;
diff --git a/packages/share-theme/src/scripts/modules/expanders.ts b/packages/share-theme/src/page/navigation.ts
similarity index 100%
rename from packages/share-theme/src/scripts/modules/expanders.ts
rename to packages/share-theme/src/page/navigation.ts
diff --git a/packages/share-theme/src/styles/popouts/search.css b/packages/share-theme/src/page/search.css
similarity index 75%
rename from packages/share-theme/src/styles/popouts/search.css
rename to packages/share-theme/src/page/search.css
index 38c1b28f18..3ab2839108 100644
--- a/packages/share-theme/src/styles/popouts/search.css
+++ b/packages/share-theme/src/page/search.css
@@ -1,3 +1,28 @@
+.search-item {
+ display: flex;
+ align-items: center;
+ position: relative;
+}
+
+.search-input {
+ color: var(--text-primary);
+ background: var(--background-highlight);
+ outline: 0;
+ border: 0;
+ flex: 1;
+ padding: 5px 5px 5px 32px;
+ width: 200px;
+ border-radius: 6px;
+}
+
+.search-icon {
+ display: flex;
+ color: var(--text-primary);
+ position: absolute;
+ width: 20px;
+ left: 5px;
+}
+
.search-results {
display: flex;
flex-direction: column;
diff --git a/packages/share-theme/src/scripts/modules/search.spec.ts b/packages/share-theme/src/page/search.spec.ts
similarity index 100%
rename from packages/share-theme/src/scripts/modules/search.spec.ts
rename to packages/share-theme/src/page/search.spec.ts
diff --git a/packages/share-theme/src/scripts/modules/search.ts b/packages/share-theme/src/page/search.ts
similarity index 100%
rename from packages/share-theme/src/scripts/modules/search.ts
rename to packages/share-theme/src/page/search.ts
diff --git a/packages/share-theme/src/styles/navbar/header.css b/packages/share-theme/src/page/theme_switch.css
similarity index 73%
rename from packages/share-theme/src/styles/navbar/header.css
rename to packages/share-theme/src/page/theme_switch.css
index 5e7f6a6b48..ecb8eca802 100644
--- a/packages/share-theme/src/styles/navbar/header.css
+++ b/packages/share-theme/src/page/theme_switch.css
@@ -1,9 +1,3 @@
-#site-header {
- display: flex;
- flex-direction: column;
- gap: 20px;
-}
-
.switch {
position: relative;
display: inline-block;
@@ -92,28 +86,3 @@ input:checked ~ .dark-icon {
right: 5px;
color: var(--background-highlight);
}
-
-.search-item {
- display: flex;
- align-items: center;
- position: relative;
-}
-
-.search-input {
- color: var(--text-primary);
- background: var(--background-highlight);
- outline: 0;
- border: 0;
- flex: 1;
- padding: 5px 5px 5px 32px;
- width: 200px;
- border-radius: 6px;
-}
-
-.search-icon {
- display: flex;
- color: var(--text-primary);
- position: absolute;
- width: 20px;
- left: 5px;
-}
diff --git a/packages/share-theme/src/scripts/modules/theme.ts b/packages/share-theme/src/page/theme_switch.ts
similarity index 100%
rename from packages/share-theme/src/scripts/modules/theme.ts
rename to packages/share-theme/src/page/theme_switch.ts
diff --git a/packages/share-theme/src/styles/toc.css b/packages/share-theme/src/page/toc.css
similarity index 76%
rename from packages/share-theme/src/styles/toc.css
rename to packages/share-theme/src/page/toc.css
index 28c2d75421..8a99e1ff89 100644
--- a/packages/share-theme/src/styles/toc.css
+++ b/packages/share-theme/src/page/toc.css
@@ -100,3 +100,30 @@
#content h6 a.toc-anchor {
margin-left: 10px;
}
+
+@media (max-width: 48em) {
+ #toc-pane {
+ display: flex;
+ position: fixed;
+ top: 0;
+ bottom: 0;
+ right: 0;
+ width: 80%;
+ max-width: 300px;
+ padding: 20px;
+ background: var(--background-secondary);
+ transform: translateX(100%);
+ transition: transform 200ms ease;
+ z-index: 2;
+ overflow-y: auto;
+ }
+
+ #toc-pane h3,
+ #toc-pane #toc {
+ display: block;
+ }
+
+ .toc-open #toc-pane {
+ transform: translateX(0);
+ }
+}
diff --git a/packages/share-theme/src/scripts/modules/toc.ts b/packages/share-theme/src/page/toc.ts
similarity index 97%
rename from packages/share-theme/src/scripts/modules/toc.ts
rename to packages/share-theme/src/page/toc.ts
index eb119a861f..e1d89db287 100644
--- a/packages/share-theme/src/scripts/modules/toc.ts
+++ b/packages/share-theme/src/page/toc.ts
@@ -1,6 +1,6 @@
import { revealTab } from "@triliumnext/ckeditor5/src/plugins/tabs/tabs_read_only.js";
-import { closeMobileMenus } from "./mobile.js";
+import { closeMobileMenus } from "./layout.js";
/**
* The ToC is now generated in the page template so
diff --git a/packages/share-theme/src/scripts/modules/mobile.ts b/packages/share-theme/src/scripts/modules/mobile.ts
deleted file mode 100644
index bcb2e38e14..0000000000
--- a/packages/share-theme/src/scripts/modules/mobile.ts
+++ /dev/null
@@ -1,16 +0,0 @@
-export default function setupMobileMenu() {
- // A listener on the backdrop itself, not on `window`: iOS Safari dispatches no `click` for a
- // tap on an element it does not consider clickable, and `window` listeners do not count.
- document.getElementById("mobile-backdrop")?.addEventListener("click", closeMobileMenus);
-
- // Going back to a page restored from the back/forward cache keeps the panel that was
- // open when the user tapped a link in it.
- window.addEventListener("pageshow", e => {
- if (e.persisted) closeMobileMenus();
- });
-}
-
-export function closeMobileMenus() {
- document.body.classList.remove("menu-open");
- document.body.classList.remove("toc-open");
-}
diff --git a/packages/share-theme/src/styles/mobile.css b/packages/share-theme/src/styles/mobile.css
deleted file mode 100644
index 161903bb85..0000000000
--- a/packages/share-theme/src/styles/mobile.css
+++ /dev/null
@@ -1,122 +0,0 @@
-#header {
- background: var(--background-secondary);
- display: flex;
- justify-content: space-between;
- align-items: center;
- padding: 6px 12px;
- border-bottom: 1px solid var(--background-highlight);
-}
-
-#header-logo {
- display: flex;
- align-items: center;
- gap: 5px;
- font-weight: bold;
-}
-
-#header-logo img {
- max-width: 32px;
-}
-
-.header-button {
- color: var(--text-menu);
- background: transparent;
- margin: 0;
- padding: 4px;
- border: 0;
- outline: 0;
- display: flex;
- align-items: center;
- cursor: pointer;
- border-radius: 6px;
- transition: background-color 200ms ease, transform 200ms ease;
-}
-
-.header-button:hover {
- background-color: var(--background-highlight);
-}
-
-.header-button-placeholder {
- width: 32px;
-}
-
-#mobile-backdrop {
- display: none;
-}
-
-@media (max-width: 48em) {
-
- html,
- body {
- height: 100%;
- }
-
- #split-pane {
- overflow: hidden;
- }
-
- #right-pane, #main {
- width: 100%;
- padding: 0;
- }
-
- #main {
- padding: 1rem;
- }
-
- #header .header-button svg {
- width: 32px;
- height: 32px;
- }
-
- #left-pane, #toc-pane {
- position: fixed;
- top: 0;
- bottom: 0;
- width: 80%;
- max-width: 300px;
- background: var(--background-secondary);
- transition: transform 200ms ease;
- z-index: 2;
- overflow-y: auto;
- }
-
- #left-pane {
- left: 0;
- transform: translateX(-100%);
- }
-
- #toc-pane {
- display: flex;
- right: 0;
- transform: translateX(100%);
- padding: 20px;
- }
-
- #toc-pane h3,
- #toc-pane #toc {
- display: block;
- }
-
- .menu-open #left-pane,
- .toc-open #toc-pane {
- transform: translateX(0);
- }
-
- #mobile-backdrop {
- display: block;
- position: fixed;
- inset: 0;
- background: rgba(0,0,0,0);
- pointer-events: none;
- transition: background-color 200ms ease;
- z-index: 1;
- }
-
- body.menu-open #mobile-backdrop,
- body.toc-open #mobile-backdrop {
- background: rgba(0,0,0, 0.6);
- pointer-events: auto;
- }
-
-}
diff --git a/packages/share-theme/src/styles/navbar/index.css b/packages/share-theme/src/styles/navbar/index.css
deleted file mode 100644
index e77988f54c..0000000000
--- a/packages/share-theme/src/styles/navbar/index.css
+++ /dev/null
@@ -1,2 +0,0 @@
-@import "./header.css";
-@import "./navbar.css";
\ No newline at end of file
diff --git a/packages/share-theme/src/styles/popouts/index.css b/packages/share-theme/src/styles/popouts/index.css
deleted file mode 100644
index 52ded226e5..0000000000
--- a/packages/share-theme/src/styles/popouts/index.css
+++ /dev/null
@@ -1 +0,0 @@
-@import "./search.css";
\ No newline at end of file