Skip to content

Commit ccebc7f

Browse files
committed
fix(theming): Correctly generate CSS for font themes
Fixes a regression from dropping the SCSS compiler that broke font themes like OpenDyslexic. The old code relied on the SCSS compiler to automatically correct the order of the CSS rules, ensuring the @font-face declaration was always valid. The server now correctly generates the `@font-face` rule at the top level of the stylesheet, fixing the previously invalid nested CSS. Introduced in : f1448fc Signed-off-by: nfebe <fenn25.fn@gmail.com>
1 parent a4879f2 commit ccebc7f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

apps/theming/lib/Controller/ThemingController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ public function getThemeStylesheet(string $themeId, bool $plain = false, bool $w
402402
$css = ":root { $variables } " . $customCss;
403403
} else {
404404
// If not set, we'll rely on the body class
405-
$css = "[data-theme-$themeId] { $variables $customCss }";
405+
$css = "$customCss [data-theme-$themeId] { $variables }";
406406
}
407407

408408
try {

0 commit comments

Comments
 (0)