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.

New btn-rounded utility class?

See original GitHub issue

Hi! I’m suggesting a simple, yet effective utility class here for buttons to be added. Whilst the Bootstrap docs does indeed have a rounded-circle utility class found in the border section (https://getbootstrap.com/docs/4.1/utilities/borders/#border-radius) this doesn’t quite work too well when applied to buttons to essentially create a pill shaped button.

The rounded-circle utility class looks like this and doesn’t quite work as expected when added to buttons.

.rounded-circle {
    border-radius: 50%!important;
}

I suggest creating an additional utility class with a px value for buttons to create a nice effect, possibly something like this…

.btn-rounded {
    border-radius: 50px!important;
}

I use rounded buttons a lot in my work and find myself having to create these classes, I don’t think it would take too much to add this in the next release?

Cheers!

Issue Analytics

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

github_iconTop GitHub Comments

3reactions
mdocommented, May 10, 2018

Rather than make button specific classes, this should a .rounded-* utility class. Something like .rounded-pill or .rounded-50 to indicate a value.

1reaction
quberokcommented, May 8, 2018

awesome feature

Read more comments on GitHub >

github_iconTop Results From Across the Web

Borders - Bootstrap
Great for images, buttons, or any other element. Border. Use border utilities to add or remove an element's borders. Choose from all borders...
Read more >
Bootstrap Buttons - examples & tutorial
Responsive Buttons built with Bootstrap 5. Multiple predefined button style classes: button link, outline, round button, social, floating, fixed & more.
Read more >
Utility classes • bslib - GitHub Pages
Bootstrap 4 (and higher) comes with a suite of handy utility classes for handling common yet fickle styling issues like spacing, borders, sizing,...
Read more >
Border Radius - Tailwind CSS
Tailwind lets you conditionally apply utility classes in different states using variant modifiers. For example, use hover:rounded-lg to only apply the rounded- ...
Read more >
Bootstrap 5 Utilities - W3Schools
The classes are used in the format: {property}{sides}-{size} for xs and {property}{sides}-{breakpoint}-{size} for sm , md , lg , xl and xxl ....
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