question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Consider updating design of badges component

See original GitHub issue

The current badges component with the contextual variants (https://getbootstrap.com/docs/4.1/components/badge/#contextual-variations) are considerably small with weird vertical positioning. I usually tend to overwrite the padding on these badges using my own styling as I feel they’re a little too small. I’ve made a few minor tweaks to the current CSS and shall provide two screenshots with some code of what’s different, what do you guys think?

Before:

capture

After:

capture

Code edits:

.badge {
    padding: .4em .9em;
    /* line-height: 1; */
}

Thoughts?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
mdocommented, Aug 20, 2018

Main issue here is Segoe UI sits far too low on the x-height, so the vertical alignment of the text within looks incorrect.

1reaction
MartijnCuppenscommented, Aug 26, 2018

I think they’re ok like they are now. Badges are frequently used in buttons and navs and do not need more padding there.

If we’re going to increase the padding, they look more like the .btn.btn-sm buttons.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Badge UI design exploration — Tips & tricks, usability, and ...
Purposes, use-cases, UX patterns reviewed, and other things to consider. ... Use Icons inside Badge to show up the condition of a related...
Read more >
Badge - Components - Paste: The Design System for building ...
Use the Success Badge to highlight attributes of an object that were completed or would be considered to be in a good state....
Read more >
Badge
A badge is a component used to provide information on new updates and notifications. It is used with other components and cannot be...
Read more >
How to use Badge Component in ReactJS?
We can use the Badge Component in ReactJS using the following approach. Creating React Application And Installing Module: Step 1: Create a React ......
Read more >
Badge
In v1, badges were grouped with the notifications component. The size range has been expanded to include dots and microdots. In addition to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found