mirror of
https://github.com/Nystik-gh/ignis.git
synced 2026-06-17 04:35:53 +00:00
add css override. closes #3
This commit is contained in:
10
server/assets/overrides.css
Normal file
10
server/assets/overrides.css
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
/* CSS overrides for browser vs desktop differences. */
|
||||||
|
|
||||||
|
/* Remove right padding for non-existent window controls (minimize/maximize/close). */
|
||||||
|
.is-hidden-frameless:not(.is-fullscreen) .workspace-tabs.mod-top-right-space .workspace-tab-header-container {
|
||||||
|
padding-right: var(--size-4-2) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.is-hidden-frameless:not(.is-fullscreen):not(.mod-macos) .workspace-tabs.mod-top-right-space .workspace-tab-header-container:after {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
9
src/shims/css-overrides.js
Normal file
9
src/shims/css-overrides.js
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
// Injects a link to the CSS overrides stylesheet served from /assets/overrides.css.
|
||||||
|
|
||||||
|
export function installCssOverrides() {
|
||||||
|
const link = document.createElement("link");
|
||||||
|
link.rel = "stylesheet";
|
||||||
|
link.href = "/assets/overrides.css";
|
||||||
|
link.setAttribute("data-ignis", "css-overrides");
|
||||||
|
document.head.appendChild(link);
|
||||||
|
}
|
||||||
@@ -1,10 +1,12 @@
|
|||||||
import { installRequire } from "./require.js";
|
import { installRequire } from "./require.js";
|
||||||
import { installGlobals } from "./globals.js";
|
import { installGlobals } from "./globals.js";
|
||||||
|
import { installCssOverrides } from "./css-overrides.js";
|
||||||
import { initialize } from "./init.js";
|
import { initialize } from "./init.js";
|
||||||
import { fsShim } from "./fs/index.js";
|
import { fsShim } from "./fs/index.js";
|
||||||
|
|
||||||
installGlobals(); // process, Buffer, window overrides (before require so Buffer is available)
|
installGlobals(); // process, Buffer, window overrides (before require so Buffer is available)
|
||||||
installRequire(); // shim registry, window.require
|
installRequire(); // shim registry, window.require
|
||||||
|
installCssOverrides(); // browser-specific CSS fixes
|
||||||
initialize(); // vault config, metadata cache, plugin prompt
|
initialize(); // vault config, metadata cache, plugin prompt
|
||||||
|
|
||||||
// Connect file watcher WebSocket after everything is initialized
|
// Connect file watcher WebSocket after everything is initialized
|
||||||
|
|||||||
Reference in New Issue
Block a user