Shouldn't border-radius classes (rounded-*) replace element's default border-radius?
See original GitHub issueLet’s say we have a button:
<button class="btn btn-primary">Test</button>
It will be applied the .btn’s default border-radius, which is a .25rem radius for every corner:
border-radius: .25rem;
Let’s say we only want the left side corners to be rounded. So we do:
<button class="btn btn-primary rounded-left">Test</button>
Nothing changes and every corner (even from right side) is still rounded. It happens because .rounded-left is:
border-bottom-left-radius: .25rem;
border-top-left-radius: .25rem;
Shouldn’t we add:
border-bottom-right-radius: 0 !important;
border-top-right-radius: 0 !important;
Onto .rounded-left so it will change the element’s default border radius to be controlled by rounded-* classes?
Or it’s meant to be done somehow else?
Issue Analytics
- State:
- Created 6 years ago
- Comments:10 (5 by maintainers)
Top Results From Across the Web
css - Should border-radius clip the content? - Stack Overflow
Semantically speaking, it's best to simply add a border-radius inherit property to the inner div, hence the new class addition:
Read more >border-radius - CSS: Cascading Style Sheets - MDN Web Docs
The border-radius CSS property rounds the corners of an element's outer border edge. You can set a single radius to make circular corners, ......
Read more >Bug Report: Border radius on "line" element does not round all ...
Change the border radius to 10px on all corners; You will see that only the top-right and top-left corners become rounded.
Read more >border-radius - CSS-Tricks
You can give any element “rounded corners” by applying a border-radius through CSS. You'll only notice if there is a color change involved....
Read more >Input controls do not override button's border radius
The border-radius for those widgets can be controlled by setting the "rounded" option. At the same time, when using SASS themes, a button's ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

The solution suggested by @morrissey-ingenious no longer works, since rounded-0 was changed in aa5e97da044d774e4d1b5c54234cc8bf1ce862f5 to use !important and is declared after rounded-top, rounded-right, rounded-bottom and rounded-left.
You can do this by stacking
rounded-0androunded-lefton the button<button class="btn btn-primary rounded-0 rounded-left">Test</button>https://codepen.io/morrissey-ingenious/pen/NvZRzg