web: Safari fixes merge branch (#14181)

* web/admin: Fix layout centering. Adjust theming.

* web: Fix issue where references to Lit SSR break page styles.

* web: Fix issues surrounding color scheme/theme mixup in UI.
This commit is contained in:
Teffen Ellis
2025-04-24 16:16:04 +02:00
committed by GitHub
parent e9822cd937
commit cf160f800d
31 changed files with 1408 additions and 816 deletions

View File

@ -1,19 +1,20 @@
import {
appendStyleSheet,
assertAdoptableStyleSheetParent,
} from "@goauthentik/common/stylesheets.js";
import { TemplateResult, render as litRender } from "lit";
import AKGlobal from "@goauthentik/common/styles/authentik.css";
import PFBase from "@patternfly/patternfly/patternfly-base.css";
import { ensureCSSStyleSheet } from "../utils/ensureCSSStyleSheet.js";
// A special version of render that ensures our style sheets will always be available
// to all elements under test. Ensures they look right during testing, and that any
// CSS-based checks for visibility will return correct values.
export const render = (body: TemplateResult) => {
document.adoptedStyleSheets = [
...document.adoptedStyleSheets,
ensureCSSStyleSheet(PFBase),
ensureCSSStyleSheet(AKGlobal),
];
assertAdoptableStyleSheetParent(document);
appendStyleSheet([PFBase, AKGlobal], document);
return litRender(body, document.body);
};