Composer, font-family and CSS

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”.

1 Like

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.

1 Like

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

1 Like