Is `font-family: inherit;` in `.w-tc-editor` required?

Open
#147 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
35/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
react, tailwindcss, typescript
Domain
frontend

Research direction

Inspect the .w-tc-editor style declaration and reproduce the interaction with Tailwind's font-mono class. Determine whether the font-family: inherit rule is needed; done means the intended custom class styling works without inline styles or !important, with any relevant behavior verified.

Written by the indexing model from the issue text.

Description

Thank you for your hard work.

I am using this library with Tailwind. However, after adding the font-mono class, it is not working in the library. The reason for this is that the class .w-tc-editor is set to font-family: inherit;, which overrides the font-mono setting. This could happen to any custom class.

Although I can use inline styles or !important to fix this issue, I believe that using a class to provide the style is better practice. Furthermore, even without any font settings, the element would still inherit the style.

Dominant language
TypeScript
Stars
575
Forks
23
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from uiwjs/react-textarea-code-editor

All issues in uiwjs/react-textarea-code-editor

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.