-
-
Couldn't load subscription status.
- Fork 4.6k
fix(theming): Correctly generate CSS for font themes #53857
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That looks wrong 🤔
It means the style will be applied everywhere and not just within the data attribute?
You're right that custom style is global, but that only defines the styles; it's only applied by the variables scoped within the data-theme attribute. And by the way, the Dyslexic font does not work any more when you to to "Personal settings > Appearance and accessibility" EDIT Thought about it, in terms of @-rules only, so it appears it needs a more dynamic approach. Updating. |
ccebc7f to
b301f14
Compare
|
Alternative would be to add a new field like |
|
Also, keep in mind not every theme will have font in the custom CSS entry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixes dyslexia at least
We need to backport this to 31, so a simple solution that works for designed use cases (dark, contrast and dyslexia) is good enough for now I'd say. |
Yes at least for the moment as there are no external themes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Solves the issue, but very fragile code.
As soon as e.g. there is a @ in a comment it breaks.
But for the moment it works as we only have our themes and there is no way for external 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>
b301f14 to
625c126
Compare
Added a two lines to strip comments, but yeah we definitely need a proper way to do this eventually. |
|
/backport to stable31 |
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-facerule at the top level of the stylesheet, fixing the previously invalid nested CSS.Introduced in : f1448fc via #52249