איזה גופן משמש בעורך ב-meta.discourse.org?

I notice the font is differn’t from the post/preview font. Really nice! Where is this setting?

Seems to be this:
image

Only related setting I found were for the general fonts:

Thanks

2 לייקים

You can click on “–d-font-family–monospace” in your screenshot.
It shows:

--d-font-family--monospace: JetBrains Mono, Consolas, Monaco, monospace;

It’s using JetBrains Mono, it’s great font

Related to Monospace font in the Markdown-only editor - #14 by sam.

4 לייקים

It’s beautiful! :smiling_face_with_sunglasses: And fits the tech niche well in my case, as it looks a lot like a terminal font.

I am not sure if I missed it in the answer, but where in Admin do I set this for the editor?

Edit, it think I’m finding it: Change the default font on your site

Will edit once I do.

2 לייקים

You can overwrite with CSS, for example:

body {
    --d-font-family--monospace: consolas;
}

Note that this variable is not only used in the editor.

If you want to target only the editor:

.d-editor .d-editor-input {
  font-family: consolas;
}
לייק 1

Thanks. I did get it by adding this to my global header:

<link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono&display=swap" rel="stylesheet">

And this to global CSS:

:root {
  --d-font-family--monospace: "JetBrains Mono", Consolas, Monaco, monospace;
}

code,
pre,
.hljs,
.cooked code,
.d-editor-input,
.d-editor-preview code,
.d-editor-preview pre,
.markdown code,
blockquote code,
pre code {
  font-family: "JetBrains Mono", Consolas, Monaco, monospace !important;
}

What discourse version are you using?

The next time you rebuild, you won’t need this CSS.
The font was introduced on April 2nd, and your build date is March 27.

לייק 1

So I can rebuild now and remove the entire block of CSS I pasted above?

What about the Google font?:

<link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono&display=swap" rel="stylesheet">

Yes, you don’t need any additions.

לייק 1

Thanks will do!

לייק 1

I was wondering why the font on Meta looked better than my own site, and now I know why! :laughing:

Glad to see this new font update, subtle change but looks great.

4 לייקים

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.