ionic-team / ionic-framework

A powerful cross-platform UI toolkit for building native-quality iOS, Android, and Progressive Web Apps with HTML, CSS, and JavaScript.
https://ionicframework.com
MIT License
50.47k stars 13.53k forks source link

feat(button): set default shape to soft for ios and round for md and ionic themes #29404

Closed brandyscarney closed 6 days ago

brandyscarney commented 2 weeks ago

Issue number: internal


What is the current behavior?

The shape property defaults to "soft" for ios and "round" for the md and ionic themes.

Default button size:

Property Value CSS Value (ionic) CSS Value (ios) CSS Value (md)
undefined 8px 14px 4px
"round" 999px unsupported unsupported
"rectangular" 0px unsupported unsupported

Large button size:

Property Value CSS Value (ionic) CSS Value (ios) CSS Value (md)
undefined 8px 16px 4px

Small button size:

Property Value CSS Value (ionic) CSS Value (ios) CSS Value (md)
undefined 4px 6px 4px

What is the new behavior?

The shape property defaults to undefined which evaluates to the "Soft" shape for all themes.

Default button size:

Property Value CSS Value (ionic) CSS Value (ios) CSS Value (md)
"soft" 8px 6px 4px
"round" 999px 999px 999px
"rectangular" 0px 0px 0px

Large button size:

Property Value CSS Value (ionic) CSS Value (ios) CSS Value (md)
soft 8px 8px 4px

Small button size:

Property Value CSS Value (ionic) CSS Value (ios) CSS Value (md)
soft 4px 4px 4px
Before After
before after

Does this introduce a breaking change?

BREAKING CHANGE:

The border-radius of the ios and md button now defaults to 6px and 999px instead of 14px and 4px, respectively, in accordance with the iOS and Material Design 3 guidelines. To revert to the previous appearance, set the shape to "soft" for md and override the --border-radius CSS variable for ios to 14px, or set it to a different value entirely.

vercel[bot] commented 2 weeks ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
ionic-framework ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 8, 2024 7:17pm