Skip to content
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

Font in Custom CSS does not alter Bielefeld theme font #312

Closed
DutchPete opened this issue Sep 9, 2019 · 6 comments
Closed

Font in Custom CSS does not alter Bielefeld theme font #312

DutchPete opened this issue Sep 9, 2019 · 6 comments

Comments

@DutchPete
Copy link

Description

I am using the Bielefeld theme, but want to have a different font with it. So, according to your documentation page, this what I put in the Custom CSS file:

#editor {
    font-family: '<DejaVu Sans Condensed>', <sans-serif>;
}

But that does not change the font in Bielefeld.

Reproducing

Add the code above to Custom CSS, and see the non-result.

Expected behaviour

I would expect the Custom CSS file to take prevalence.

Screenshots

Platform

  • OS: Linux Mint
  • OS Version 19.2
  • Zettlr Version 1.4.1
  • Screen Resolution [only necessary if the bug is relating to the GUI]

Additional information

@nathanlesage
Copy link
Member

I strongly assume the greather-than and less-than-signs (< and >) are not part of the font's name, correct? It might help if you'd remove these. But thanks for the info, I haven't updated the class-list yet.

@DutchPete
Copy link
Author

I deleted the angled brackets, but that does not make any difference after closing and reopening the app. Anything else I am not doing right?

@nathanlesage
Copy link
Member

It might be that the Bielefeld-theme is overwriting the font at another place. The best way is to switch to develop mode and actually inspect the editor element, then you'll see where it stems from.

Ah, found it. You'll need to namespace it with the body-element, so this should work:

body #editor {
    font-family: 'DejaVu Sans Condensed', sans-serif;
}

@DutchPete
Copy link
Author

Thank you @nathanlesage, that works. You can close the issue.

@balthild
Copy link

balthild commented Oct 11, 2019

It doesn't work when the theme is set to Frankfurt.

图片

图片

@nathanlesage
Copy link
Member

In Frankfurt, the font-family is namespaced to #editor .CodeMirror:

image

I'll keep this in mind when we refactor the design in future releases to make this homogeneous across themes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants