diff --git a/web/assets/main.css b/web/assets/main.css index d01240b28..6c98f5d40 100644 --- a/web/assets/main.css +++ b/web/assets/main.css @@ -7,3 +7,36 @@ @source "../../unraid-ui/dist/**/*.{js,mjs}"; @source "../../unraid-ui/src/**/*.{vue,ts}"; @source "../**/*.{vue,ts,js}"; + +/* Reset all inherited styles from webgui for Unraid components */ +.unraid-reset, +.unraid-reset * { + /* Reset all inherited properties to initial values */ + all: unset; + + /* Restore essential display properties */ + display: revert; + box-sizing: border-box; + + /* Ensure text is visible */ + color: inherit; + font-family: inherit; + line-height: inherit; +} + +/* Specific resets for interactive elements to restore functionality */ +.unraid-reset button, +.unraid-reset input, +.unraid-reset select, +.unraid-reset textarea { + cursor: revert; +} + +.unraid-reset a { + cursor: pointer; + text-decoration: revert; +} + +.unraid-reset [hidden] { + display: none !important; +} diff --git a/web/components/Wrapper/vue-mount-app.ts b/web/components/Wrapper/vue-mount-app.ts index 5e1101fa8..10d1ffcb6 100644 --- a/web/components/Wrapper/vue-mount-app.ts +++ b/web/components/Wrapper/vue-mount-app.ts @@ -123,6 +123,9 @@ export function mountVueApp(options: MountOptions): VueApp | null { targets.forEach((target) => { const mountTarget = target as HTMLElement; + // Add unraid-reset class to ensure webgui styles don't leak in + mountTarget.classList.add('unraid-reset'); + if (useShadowRoot) { // Create shadow root if needed if (!mountTarget.shadowRoot) {