Skip to content

Commit 8f5abf0

Browse files
jt143mdo
authored andcommitted
Add new rounded sizes classes (#28011)
* update border-radius mixins Add $enable-rounded as a keyword argument to border-raidus mixins * Update rounded classes - use border-radius mixins to repleace !important - use true for $enable-rounded for rounded classes - Add `.rounded-sm` and `.rounded-sm` #27934 * update borders docs * Revert touch of dist files * Revert change of border-radius mixins * use !important in border-radius utilies classes * update border radius classes keep only rounded-lg and rounded-sm
1 parent fd4d426 commit 8f5abf0

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

scss/utilities/_borders.scss

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,26 +30,38 @@
3030
// Border-radius
3131
//
3232

33+
.rounded-sm {
34+
border-radius: $border-radius-sm !important;
35+
}
36+
3337
.rounded {
3438
border-radius: $border-radius !important;
3539
}
40+
3641
.rounded-top {
3742
border-top-left-radius: $border-radius !important;
3843
border-top-right-radius: $border-radius !important;
3944
}
45+
4046
.rounded-right {
4147
border-top-right-radius: $border-radius !important;
4248
border-bottom-right-radius: $border-radius !important;
4349
}
50+
4451
.rounded-bottom {
4552
border-bottom-right-radius: $border-radius !important;
4653
border-bottom-left-radius: $border-radius !important;
4754
}
55+
4856
.rounded-left {
4957
border-top-left-radius: $border-radius !important;
5058
border-bottom-left-radius: $border-radius !important;
5159
}
5260

61+
.rounded-lg {
62+
border-radius: $border-radius-lg !important;
63+
}
64+
5365
.rounded-circle {
5466
border-radius: 50% !important;
5567
}

site/docs/4.2/utilities/borders.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,3 +75,17 @@ Add classes to an element to easily round its corners.
7575
<img src="..." alt="..." class="rounded-pill">
7676
<img src="..." alt="..." class="rounded-0">
7777
{% endhighlight %}
78+
79+
## Sizes
80+
81+
Use `.rounded-lg` or `.rounded-sm` for larger or smaller border-radius.
82+
83+
<div class="bd-example bd-example-images">
84+
{%- include icons/placeholder.svg width="75" height="75" class="rounded-sm" title="Example small rounded image" -%}
85+
{%- include icons/placeholder.svg width="75" height="75" class="rounded-lg" title="Example large rounded image" -%}
86+
</div>
87+
88+
{% highlight html %}
89+
<img src="..." alt="..." class="rounded-sm">
90+
<img src="..." alt="..." class="rounded-lg">
91+
{% endhighlight %}

0 commit comments

Comments
 (0)