mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-09 16:16:41 +08:00
BREAKING CHANGE: The `legacy` property and support for the legacy syntax, which involved placing an `ion-toggle` inside of an `ion-item` with an `ion-label`, have been removed from toggle. For more information on migrating from the legacy toggle syntax, refer to the [Toggle documentation](https://ionicframework.com/docs/api/toggle#migrating-from-legacy-toggle-syntax).
51 lines
2.0 KiB
SCSS
51 lines
2.0 KiB
SCSS
@import "../../themes/ionic.globals.ios";
|
|
@import "../item/item.ios.vars";
|
|
|
|
// iOS Toggle
|
|
// --------------------------------------------------
|
|
|
|
/// @prop - Width of the toggle
|
|
$toggle-ios-width: 51px !default;
|
|
|
|
/// @prop - Height of the toggle
|
|
$toggle-ios-height: 31px !default;
|
|
|
|
/// @prop - Border width of the toggle
|
|
$toggle-ios-border-width: 2px !default;
|
|
|
|
/// @prop - Border radius of the toggle
|
|
$toggle-ios-border-radius: $toggle-ios-height * 0.5 !default;
|
|
|
|
/// @prop - Background color of the unchecked toggle
|
|
$toggle-ios-background-color-off: rgba($text-color-rgb, .088) !default;
|
|
|
|
/// @prop - Width of the toggle handle
|
|
$toggle-ios-handle-width: calc(#{$toggle-ios-height} - (#{$toggle-ios-border-width} * 2)) !default;
|
|
|
|
/// @prop - Height of the toggle handle
|
|
$toggle-ios-handle-height: $toggle-ios-handle-width !default;
|
|
|
|
/// @prop - Max height of the toggle handle
|
|
$toggle-ios-handle-max-height: calc(100% - (var(--handle-spacing) * 2)) !default;
|
|
|
|
/// @prop - Border radius of the toggle handle
|
|
$toggle-ios-handle-border-radius: $toggle-ios-width * 0.5 !default;
|
|
|
|
/// @prop - Box shadow of the toggle handle
|
|
$toggle-ios-handle-box-shadow: 0 3px 4px rgba(0, 0, 0, .06), 0 3px 8px rgba(0, 0, 0, .06) !default;
|
|
|
|
/// @prop - Background color of the toggle handle
|
|
$toggle-ios-handle-background-color: #ffffff !default;
|
|
|
|
/// @prop - Transition duration of the toggle icon
|
|
$toggle-ios-transition-duration: 300ms !default;
|
|
|
|
/// @prop - Transition of the toggle icon
|
|
$toggle-ios-transition: transform $toggle-ios-transition-duration, width 120ms ease-in-out 80ms, left 110ms ease-in-out 80ms, right 110ms ease-in-out 80ms !default;
|
|
|
|
/// @prop - Opacity of the disabled toggle
|
|
$toggle-ios-disabled-opacity: .3 !default;
|
|
|
|
/// @prop - The text color of the on/off labels when the toggle is checked
|
|
$toggle-ios-on-off-label-checked-color: #fff !default;
|