Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase border-radius #1022

Merged
merged 2 commits into from
Feb 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 14 additions & 11 deletions docs/content/utilities/borders.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -171,15 +171,18 @@ Use `border-dashed` to give an element a dashed border.
Use the following utilities to add or remove rounded corners: `rounded-0` removes rounded corners, `rounded-1` applies a border radius of 3px, `rounded-2` applies a border radius of 6px. `.circle` applies a border radius of 50%, which turns square elements into perfect circles.

```html live
<div class="Box rounded-0 mb-2">
<div class="border rounded-0 p-2 mb-2">
.rounded-0
</div>
<div class="border rounded-1 mb-2">
<div class="border rounded-1 p-2 mb-2">
.rounded-1
</div>
<div class="border rounded-2 mb-2">
<div class="border rounded-2 p-2 mb-2">
.rounded-2
</div>
<div class="border rounded-3 p-2 mb-2">
.rounded-3
</div>
<div class="border circle p-3" style="width: 100px; height: 100px;">
.circle
</div>
Expand All @@ -188,17 +191,17 @@ Use the following utilities to add or remove rounded corners: `rounded-0` remove
You can also add rounded corners to each edge (top, right, bottom, left) with the following utilities:

```html live
<div class="border rounded-top-1 mb-2">
.rounded-top-1
<div class="border rounded-top-2 p-2 mb-2">
.rounded-top-2
</div>
<div class="border rounded-right-1 mb-2">
.rounded-right-1
<div class="border rounded-right-2 p-2 mb-2">
.rounded-right-2
</div>
<div class="border rounded-bottom-1 mb-2">
.rounded-bottom-1
<div class="border rounded-bottom-2 p-2 mb-2">
.rounded-bottom-2
</div>
<div class="border rounded-left-1 mb-2">
.rounded-left-1
<div class="border rounded-left-2 p-2 mb-2">
.rounded-left-2
</div>
```

Expand Down
2 changes: 1 addition & 1 deletion src/support/variables/misc.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ $border-width: 1px !default;
$border-color: $border-gray !default;
$border-style: solid !default;
$border: $border-width $border-color $border-style !default;
$border-radius: 3px !default;
$border-radius: 6px !default;

// Box shadow
$box-shadow: 0 1px 1px rgba($black, 0.1) !default;
Expand Down
16 changes: 12 additions & 4 deletions src/utilities/borders.scss
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,12 @@
// Rounded corners
/* Remove the border-radius */
.rounded#{$variant}-0 { border-radius: 0 !important; }
/* Add a half border-radius to all corners */
.rounded#{$variant}-1 { border-radius: $border-radius / 2 !important; }
/* Add a border-radius to all corners */
.rounded#{$variant}-1 { border-radius: $border-radius !important; }
/* Add a 2x border-radius to all corners */
.rounded#{$variant}-2 { border-radius: $border-radius * 2 !important; }
.rounded#{$variant}-2 { border-radius: $border-radius !important; }
/* Add a double border-radius to all corners */
.rounded#{$variant}-3 { border-radius: $border-radius * 2 !important; }

@each $edge, $corners in $edges {
.rounded#{$variant}-#{$edge}-0 {
Expand All @@ -56,11 +58,17 @@

.rounded#{$variant}-#{$edge}-1 {
@each $corner in $corners {
border-#{$corner}-radius: $border-radius !important;
border-#{$corner}-radius: $border-radius / 2 !important;
}
}

.rounded#{$variant}-#{$edge}-2 {
@each $corner in $corners {
border-#{$corner}-radius: $border-radius !important;
}
}

.rounded#{$variant}-#{$edge}-3 {
@each $corner in $corners {
border-#{$corner}-radius: $border-radius * 2 !important;
}
Expand Down