Skip to content

Commit 9f4bdd7

Browse files
committed
Clarify.
1 parent 4e82848 commit 9f4bdd7

1 file changed

Lines changed: 14 additions & 4 deletions

File tree

web/src/elements/Base.ts

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,13 @@ export class AKElement extends LitElement implements AKElementProps {
145145

146146
/**
147147
* A custom CSS style sheet to apply to the element.
148+
*
149+
* @deprecated Use CSS parts and custom properties instead.
150+
*
151+
* @remarks
152+
* The use of injected style sheets may result in brittle styles that are hard to
153+
* maintain across authentik versions.
154+
*
148155
*/
149156
readonly #customCSSStyleSheet: CSSStyleSheet | null;
150157

@@ -157,6 +164,13 @@ export class AKElement extends LitElement implements AKElementProps {
157164
*/
158165
#styleRoot?: StyleRoot;
159166

167+
/**
168+
* The style root to which the theme is applied.
169+
*/
170+
protected get styleRoot(): StyleRoot | undefined {
171+
return this.#styleRoot;
172+
}
173+
160174
protected set styleRoot(nextStyleRoot: StyleRoot | undefined) {
161175
this.#themeAbortController?.abort();
162176

@@ -183,10 +197,6 @@ export class AKElement extends LitElement implements AKElementProps {
183197
}
184198
}
185199

186-
protected get styleRoot(): StyleRoot | undefined {
187-
return this.#styleRoot;
188-
}
189-
190200
protected hasSlotted(name: string | null) {
191201
const isNotNestedSlot = (start: Element) => {
192202
let node = start.parentNode;

0 commit comments

Comments
 (0)