Skip to content

MudToggleGroup: Remove Rounded in favor of CSS utilities rounded-*#10533

Merged
henon merged 2 commits into
MudBlazor:devfrom
danielchalmers:togglegroup-rounded
Dec 28, 2024
Merged

MudToggleGroup: Remove Rounded in favor of CSS utilities rounded-*#10533
henon merged 2 commits into
MudBlazor:devfrom
danielchalmers:togglegroup-rounded

Conversation

@danielchalmers

@danielchalmers danielchalmers commented Dec 28, 2024

Copy link
Copy Markdown
Member

Description

Resolves #10522 by using the theme border radius and moving any further rounding onto the user which allows greater control. Previously the rounding classes added by the component themselves would override the user's choice.

Migration:

  • ToggleGroup.Rounded was removed and uses the default border radius by default. Override the rounding with CSS styles or utility classes (ex: rounded-pill).

How Has This Been Tested?

visually

Type of Changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation (fix or improvement to the website or code docs)

Default state with default border radius of 4px:

image

rounded-pill added to Class property:

image

Checklist

  • The PR is submitted to the correct branch (dev).
  • My code follows the code style of this project.
  • I've added relevant tests.

@danielchalmers danielchalmers requested a review from henon December 28, 2024 20:12
@github-actions github-actions Bot added breaking change This change will require consumer code updates (ex: removes/changes an API) PR: needs review labels Dec 28, 2024
@sonarqubecloud

Copy link
Copy Markdown

@henon

henon commented Dec 28, 2024

Copy link
Copy Markdown
Contributor

Wow, this was easy ;)

@mckaragoz FYI, we now have better control over the corner radius via the rounded-* classes, same as in MudButton etc.

@henon henon changed the title ToggleGroup: Remove Rounded to support CSS utilities MudToggleGroup: Remove Rounded to support CSS utilities Dec 28, 2024
@henon henon changed the title MudToggleGroup: Remove Rounded to support CSS utilities MudToggleGroup: Remove Rounded in favor of CSS utilities rounded-* Dec 28, 2024
@henon henon merged commit 01a9b01 into MudBlazor:dev Dec 28, 2024
@henon henon mentioned this pull request Dec 28, 2024
@henon

henon commented Dec 28, 2024

Copy link
Copy Markdown
Contributor

Thanks. Added to v8.0.0 Migration Guide

@mckaragoz

Copy link
Copy Markdown
Member

I think we should add an example into docs to show how to rounded. In first each item has its own rounded property. Then we changed it to the container class so yes it's possible with utility CSS now

@henon

henon commented Dec 29, 2024

Copy link
Copy Markdown
Contributor

I think we should add an example into docs to show how to rounded

Yes, but we don't need an extra example for it. We can just add it to one of the other examples where appropriate. The same could be done for MudButton and many other components to draw more attention to the css utilities

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking change This change will require consumer code updates (ex: removes/changes an API)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Issue: Rounded parameter of MudToggleGroup Incorrect

3 participants