-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(fab): Introduces new floating action buttons
- Loading branch information
1 parent
a98e209
commit e16d3e9
Showing
22 changed files
with
643 additions
and
176 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
@import "../../themes/ionic.globals.ios"; | ||
|
||
// iOS FAB Button | ||
// -------------------------------------------------- | ||
|
||
/// @prop - Border radius of the FAB button | ||
$button-ios-fab-border-radius: 50% !default; | ||
|
||
.fab-button { | ||
border-radius: $button-ios-fab-border-radius; | ||
} | ||
|
||
// iOS does not use the button effect | ||
ion-button-effect { | ||
display: none; | ||
} | ||
|
||
|
||
// Generate iOS FAB colors | ||
// -------------------------------------------------- | ||
|
||
@each $color-name, $color-base, $color-contrast in get-colors($colors-ios) { | ||
|
||
$background-color: $color-base; | ||
$background-color-activated: color-shade($background-color); | ||
$fg-color: $color-contrast; | ||
|
||
.fab-ios-#{$color-name} { | ||
color: $fg-color; | ||
background-color: $background-color; | ||
} | ||
|
||
.fab-ios-#{$color-name}.activated { | ||
background-color: $background-color-activated; | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
@import "../../themes/ionic.globals.md"; | ||
|
||
// Material Design FAB Button | ||
// -------------------------------------------------- | ||
|
||
/// @prop - Border radius of the FAB button | ||
$button-md-fab-border-radius: 50% !default; | ||
|
||
/// @prop - Box shadow of the FAB button | ||
$button-md-fab-box-shadow: 0 4px 6px 0 rgba(0, 0, 0, .14), 0 4px 5px rgba(0, 0, 0, .1) !default; | ||
|
||
/// @prop - Box shadow of the activated FAB button | ||
$button-md-fab-box-shadow-activated: 0 5px 15px 0 rgba(0, 0, 0, .4), 0 4px 7px 0 rgba(0, 0, 0, .1) !default; | ||
|
||
|
||
.fab-button { | ||
border-radius: $button-md-fab-border-radius; | ||
box-shadow: $button-md-fab-box-shadow; | ||
|
||
transition: box-shadow $button-md-transition-duration $button-md-transition-timing-function, | ||
background-color $button-md-transition-duration $button-md-transition-timing-function, | ||
color $button-md-transition-duration $button-md-transition-timing-function; | ||
|
||
&.activated { | ||
box-shadow: $button-md-fab-box-shadow-activated; | ||
} | ||
} | ||
|
||
[icon-only] { | ||
padding: 0; | ||
} | ||
|
||
// Generate iOS FAB colors | ||
// -------------------------------------------------- | ||
|
||
@each $color-name, $color-base, $color-contrast in get-colors($colors-md) { | ||
|
||
$background-color: $color-base; | ||
$background-color-activated: color-shade($background-color); | ||
$fg-color: $color-contrast; | ||
|
||
.fab-md-#{$color-name} { | ||
color: $fg-color; | ||
background-color: $background-color; | ||
} | ||
|
||
.fab-md-#{$color-name}.activated { | ||
background-color: $background-color-activated; | ||
} | ||
} | ||
|
Oops, something went wrong.