Composer, font-family and CSS

AI-generated summary

The discussion is about Composer, font-family, and CSS. Jagster asked for help with setting the font-family in the composer’s CSS, specifically wanting to use the same font as before. martin suggested using var(--font-family);, which is controlled via CSS variables. Jagster confirmed this worked, and renato clarified that the override is only needed when the rich editor site setting is enabled. Jagster mentioned they need the rich editor for their users, despite being happy with markdown themselves.

Jatkoa ketjulle Test our new composer on Meta!:

Sorry real devs — this is totally 101-level question, but we don’t have such category :man_facepalming: :joy:

I have this:

.d-editor-container .d-editor-textarea-wrapper textarea.d-editor-input {
    font-family: var(--d-font-family--monospace);
  }
  • I commented rich-editor part, because I don’t have that setting, yet edited that, now it should work

But what font-family I should use there? Sure, matter of taste, but if I would like to follow some sound guidelines, and at same time not breaking my forum…

I know basics how to use fonts in CSS, but I don’t know how to tell here ”use same font or font-family as before or what we are using in WYSIWYG mode, please”.

You can use var(--font-family); for this :slight_smile: Most of our CSS is controlled this way via CSS variables.

Yes, I can indeed :joy:

Thanks, now it looks more pleasant again.

Just to clarify, you only need this override when the rich editor site setting is enabled.

I know. But I need the rich editor for my users. I’m totally happy with markdown.