haaarshsingh / kmenu

The perfect ⌘K menu
https://kmenu.harshsingh.xyz
MIT License
771 stars 24 forks source link

[BUG] Input box font? #8

Closed Just-Moh-it closed 2 years ago

Just-Moh-it commented 2 years ago

Describe the bug

For some reason, the font looks very off in the text-box... as if it were the default font

To Reproduce Steps to reproduce the behavior:

  1. Just follow the setup instructions in the docs
  2. Open the command palette and start typing to notice it

Expected behavior

Screenshot 2022-07-30 at 6 05 45 PM

Actual Behaviour

Screenshot 2022-07-30 at 6 06 10 PM

Desktop (please complete the following information):

Just-Moh-it commented 2 years ago

It's not that noticeable in the screenshots, but really stands out while typing stuff in the text box in an actual website

haaarshsingh commented 2 years ago

image image

I've done a comparison of the two, here are screenshots side by side of them. The only difference is the first one has a slightly larger font, which distorts the rendering a bit.

In the screenshot you have shown me, that's not a problem on kmenu's side -- it's a problem on your side. It's visible that the font in the input field is the default font, but the issue isn't with kmenu it's an issue with how browser styling works in-general.

By default, they do not inherit the font (the same is true with ALL form elements such as button or select), and that's something you can easily fix with some CSS. Just add in:

/* I'm assuming the font you showed me is Poppins, just replace it if it's not */
input, select, textarea, button{ font-family: 'Poppins', sans-serif; }

However, I think it's a good idea for me to put font-family: inherit in the CSS of kmenu.

haaarshsingh commented 2 years ago

Fonts will be inherited by default on kmenu v1 :champagne: