Skip to content

Conversation

louismaximepiton
Copy link
Member

@louismaximepiton louismaximepiton commented Sep 6, 2024

Description

Change the wording of the border utilities pages.

Motivation & Context

Circle and pill radiuses are part of the sizes (and in the code as well). So it makes sense to add the circle and pill to the sizes in our documentation.

Type of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Refactoring (non-breaking change)
  • Breaking change (fix or feature that would change existing functionality)

Checklist

  • I have read the contributing guidelines
  • My code follows the code style of the project (using npm run lint)
  • My change introduces changes to the documentation
  • I have updated the documentation accordingly
  • I have added tests to cover my changes
  • All new and existing tests passed

Live previews

Related issues

NA

Copy link
Member

@julien-deramond julien-deramond left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR @louismaximepiton

I understand why it has been like this before and it kind of made sense too. I don't mind landing this change for the following reasons, but I'd like feedback from other folks.

Border pill and circle are actually specific sizes with fixed values (circle is not a variable but set with 50%):

// scss-docs-start border-radius-variables
$border-radius: .375rem !default;
$border-radius-sm: .25rem !default;
$border-radius-lg: .5rem !default;
$border-radius-xl: 1rem !default;
$border-radius-xxl: 2rem !default;
$border-radius-pill: 50rem !default;
// scss-docs-end border-radius-variables
// fusv-disable
$border-radius-2xl: $border-radius-xxl !default; // Deprecated in v5.3.0
// fusv-enable

and used like this to create utilities:

"rounded": (
property: border-radius,
class: rounded,
values: (
null: var(--#{$prefix}border-radius),
0: 0,
1: var(--#{$prefix}border-radius-sm),
2: var(--#{$prefix}border-radius),
3: var(--#{$prefix}border-radius-lg),
4: var(--#{$prefix}border-radius-xl),
5: var(--#{$prefix}border-radius-xxl),
circle: 50%,
pill: var(--#{$prefix}border-radius-pill)
)
),

It makes more sense in the documentation to have it in size, especially because of the second part of the Size section.

<img src="..." class="rounded-bottom-1" alt="...">
<img src="..." class="rounded-start-2" alt="...">
<img src="..." class="rounded-end-circle" alt="...">
<img src="..." class="rounded-start-pill" alt="...">
<img src="..." class="rounded-5 rounded-top-0" alt="...">

The structure is rounded + direction (optional) + size.

@julien-deramond julien-deramond requested a review from a team September 7, 2024 08:18
@julien-deramond julien-deramond requested a review from mdo October 6, 2024 10:16
@mdo mdo merged commit 881ed59 into main Apr 3, 2025
14 checks passed
@mdo mdo deleted the main-lmp-docs-borders branch April 3, 2025 06:11
@github-project-automation github-project-automation bot moved this from Review in progress to Done in v5.3.4 Apr 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants