Skip to content

fix(themes): don't leak custom theme css after preview (@fehmer)#7876

Merged
Miodec merged 2 commits intomasterfrom
feature/fix-theme-preview-css
May 5, 2026
Merged

fix(themes): don't leak custom theme css after preview (@fehmer)#7876
Miodec merged 2 commits intomasterfrom
feature/fix-theme-preview-css

Conversation

@fehmer
Copy link
Copy Markdown
Member

@fehmer fehmer commented Apr 28, 2026

Fixes #7875

Slow network connections caused the theme css to be applied on the #customTheme stylesheet link element after clearing the theme preview with href="".

Empty href is invalid, so best to remove the whole element if we don't need it:

The address of the link(s) is given by the href attribute. If the href attribute is present, then its value must be a valid non-empty URL potentially surrounded by spaces.

https://html.spec.whatwg.org/multipage/semantics.html#attr-link-href

While chrome is applying the last css file firefox removes it correctly but keeps the loaderBar active because of the missing onLoad callback

@Miodec Miodec merged commit 542fc72 into master May 5, 2026
15 checks passed
@Miodec
Copy link
Copy Markdown
Member

Miodec commented May 5, 2026

Thanks

@Miodec Miodec deleted the feature/fix-theme-preview-css branch May 5, 2026 07:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frontend User interface or web stuff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Theme CSS Leaking

3 participants