mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-09 16:16:41 +08:00
feat(button): add ionic theme implementation (#29187)
Issue number: **ROU-4815** --------- ## What is the new behavior? - Adds an ionic theme style implementation for `ion-button`. - Adds a new `rectangular` shape to the button. - Adds two new button sizes: `xsmall` and `xlarge`. - Adds a new `focus-ring` CSS shadow part for the ionic theme. ## Does this introduce a breaking change? - [ ] Yes - [X] No ## Preview  --------- Co-authored-by: Sean Perkins <13732623+sean-perkins@users.noreply.github.com> Co-authored-by: Brandy Carney <brandy@ionic.io> Co-authored-by: Brandy Carney <brandyscarney@users.noreply.github.com> Co-authored-by: Sean Perkins <sean@ionic.io> Co-authored-by: Maria Hutt <thetaPC@users.noreply.github.com> Co-authored-by: João Ferreira <60441552+JoaoFerreira-FrontEnd@users.noreply.github.com> Co-authored-by: João Ferreira <joao.manuel.ferreira123@gmail.com>
This commit is contained in:
164
core/src/components/button/button.ionic.vars.scss
Normal file
164
core/src/components/button/button.ionic.vars.scss
Normal file
@ -0,0 +1,164 @@
|
||||
@import "../../themes/ionic.globals.ios";
|
||||
|
||||
// Ionic Button
|
||||
// -------------------------------------------------------------------------------
|
||||
|
||||
/// @prop - Border radius of the button
|
||||
$button-ionic-border-radius: px-to-rem(8) !default;
|
||||
|
||||
/// @prop - Padding top of the button
|
||||
$button-ionic-padding-top: px-to-rem(12) !default;
|
||||
|
||||
/// @prop - Padding end of the button
|
||||
$button-ionic-padding-end: px-to-rem(16) !default;
|
||||
|
||||
/// @prop - Padding bottom of the button
|
||||
$button-ionic-padding-bottom: $button-ionic-padding-top !default;
|
||||
|
||||
/// @prop - Padding start of the button
|
||||
$button-ionic-padding-start: $button-ionic-padding-end !default;
|
||||
|
||||
/// @prop - Minimum height of the button
|
||||
$button-ionic-min-height: px-to-rem(40) !default;
|
||||
|
||||
/// @prop - Font size of the button text
|
||||
/// The maximum font size is calculated by taking the default font size
|
||||
/// and multiplying it by 3, since 310% of the default is the maximum
|
||||
$button-ionic-font-size: dynamic-font-max(14px, 3) !default;
|
||||
|
||||
// Ionic Extra Small Button
|
||||
// -------------------------------------------------------------------------------
|
||||
|
||||
/// @prop - Border radius of the extra small button
|
||||
$button-ionic-xsmall-border-radius: px-to-rem(4) !default;
|
||||
|
||||
/// @prop - Padding top of the extra small button
|
||||
$button-ionic-xsmall-padding-top: px-to-rem(4) !default;
|
||||
|
||||
/// @prop - Padding end of the extra small button
|
||||
$button-ionic-xsmall-padding-end: px-to-rem(12) !default;
|
||||
|
||||
/// @prop - Padding bottom of the extra small button
|
||||
$button-ionic-xsmall-padding-bottom: $button-ionic-xsmall-padding-top !default;
|
||||
|
||||
/// @prop - Padding start of the extra small button
|
||||
$button-ionic-xsmall-padding-start: $button-ionic-xsmall-padding-end !default;
|
||||
|
||||
/// @prop - Minimum height of the extra small button
|
||||
$button-ionic-xsmall-min-height: px-to-rem(24) !default;
|
||||
|
||||
/// @prop - Font size of the extra small button text
|
||||
/// The maximum font size is calculated by taking the default font size
|
||||
/// and multiplying it by 3, since 310% of the default is the maximum
|
||||
$button-ionic-xsmall-font-size: dynamic-font-max(12px, 3) !default;
|
||||
|
||||
// Ionic Small Button
|
||||
// -------------------------------------------------------------------------------
|
||||
|
||||
/// @prop - Border radius of the small button
|
||||
$button-ionic-small-border-radius: px-to-rem(4) !default;
|
||||
|
||||
/// @prop - Padding top of the small button
|
||||
$button-ionic-small-padding-top: px-to-rem(8) !default;
|
||||
|
||||
/// @prop - Padding end of the small button
|
||||
$button-ionic-small-padding-end: px-to-rem(16) !default;
|
||||
|
||||
/// @prop - Padding bottom of the small button
|
||||
$button-ionic-small-padding-bottom: $button-ionic-small-padding-top !default;
|
||||
|
||||
/// @prop - Padding start of the small button
|
||||
$button-ionic-small-padding-start: $button-ionic-small-padding-end !default;
|
||||
|
||||
/// @prop - Minimum height of the small button
|
||||
$button-ionic-small-min-height: px-to-rem(32) !default;
|
||||
|
||||
/// @prop - Font size of the small button text
|
||||
/// The maximum font size is calculated by taking the default font size
|
||||
/// and multiplying it by 3, since 310% of the default is the maximum
|
||||
$button-ionic-small-font-size: dynamic-font-max(12px, 3) !default;
|
||||
|
||||
// Ionic Large Button
|
||||
// -------------------------------------------------------------------------------
|
||||
|
||||
/// @prop - Padding top of the large button
|
||||
$button-ionic-large-padding-top: px-to-rem(16) !default;
|
||||
|
||||
/// @prop - Padding end of the large button
|
||||
$button-ionic-large-padding-end: px-to-rem(24) !default;
|
||||
|
||||
/// @prop - Padding bottom of the large button
|
||||
$button-ionic-large-padding-bottom: $button-ionic-large-padding-top !default;
|
||||
|
||||
/// @prop - Padding start of the large button
|
||||
$button-ionic-large-padding-start: $button-ionic-large-padding-end !default;
|
||||
|
||||
/// @prop - Minimum height of the large button
|
||||
$button-ionic-large-min-height: px-to-rem(48) !default;
|
||||
|
||||
/// @prop - Font size of the large button text
|
||||
/// The maximum font size is calculated by taking the default font size
|
||||
/// and multiplying it by 3, since 310% of the default is the maximum
|
||||
$button-ionic-large-font-size: dynamic-font-max(16px, 3) !default;
|
||||
|
||||
// Ionic Extra Large Button
|
||||
// -------------------------------------------------------------------------------
|
||||
|
||||
/// @prop - Padding top of the extra large button
|
||||
$button-ionic-xlarge-padding-top: px-to-rem(16) !default;
|
||||
|
||||
/// @prop - Padding end of the extra large button
|
||||
$button-ionic-xlarge-padding-end: px-to-rem(32) !default;
|
||||
|
||||
/// @prop - Padding bottom of the extra large button
|
||||
$button-ionic-xlarge-padding-bottom: $button-ionic-xlarge-padding-top !default;
|
||||
|
||||
/// @prop - Padding start of the extra large button
|
||||
$button-ionic-xlarge-padding-start: $button-ionic-xlarge-padding-end !default;
|
||||
|
||||
/// @prop - Minimum height of the extra large button
|
||||
$button-ionic-xlarge-min-height: px-to-rem(56) !default;
|
||||
|
||||
/// @prop - Font size of the extra large button text
|
||||
/// The maximum font size is calculated by taking the default font size
|
||||
/// and multiplying it by 3, since 310% of the default is the maximum
|
||||
$button-ionic-xlarge-font-size: dynamic-font-max(20px, 3) !default;
|
||||
|
||||
// Ionic Rectangular Button
|
||||
// -------------------------------------------------------------------------------
|
||||
|
||||
/// @prop - Border radius of the rectangular button
|
||||
$button-ionic-rectangular-border: 0 !default;
|
||||
|
||||
// Ionic Round Button
|
||||
// -------------------------------------------------------------------------------
|
||||
|
||||
/// @prop - Border radius of the round button
|
||||
$button-ionic-round-border: px-to-rem(999) !default;
|
||||
|
||||
// Ionic Outline Button
|
||||
// -------------------------------------------------------------------------------
|
||||
|
||||
/// @prop - Border width of the outline button
|
||||
$button-ionic-outline-border-width: 1px !default;
|
||||
|
||||
/// @prop - Border style of the outline button
|
||||
$button-ionic-outline-border-style: solid !default;
|
||||
|
||||
// Ionic Icon Only Button
|
||||
// -------------------------------------------------------------------------------
|
||||
|
||||
/// @prop - Padding end of the icon only button
|
||||
$button-has-icon-only-padding-end: px-to-rem(13) !default;
|
||||
|
||||
/// @prop - Padding end of the icon only extra small button
|
||||
$button-has-icon-only-padding-end-xsmall: px-to-rem(6) !default;
|
||||
|
||||
/// @prop - Padding end of the icon only small button
|
||||
$button-has-icon-only-padding-end-small: px-to-rem(10) !default;
|
||||
|
||||
/// @prop - Padding end of the icon only large button
|
||||
$button-has-icon-only-padding-end-large: px-to-rem(16) !default;
|
||||
|
||||
/// @prop - Padding end of the icon only extra large button
|
||||
$button-has-icon-only-padding-end-xlarge: px-to-rem(18) !default;
|
||||
Reference in New Issue
Block a user