Skip to content

Commit

Permalink
feat(toggle): update styles to iOS 17 specs (#28722)
Browse files Browse the repository at this point in the history
Issue number: Internal

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
<!-- Please describe the current behavior that you are modifying. -->
The Toggle styles do not match iOS 17.

| iOS 17 Screenshot | New Design | Ionic |
| --------------------------------------------- |
------------------------------------------------------- |
------------------------------------------------- |
| ![iOS
Toggle](https://github.com/ionic-team/ionic-framework-design-documents/raw/0a820657b7374deff227e83dd2f9925b89eccaca/projects/ionic-framework/ios-17/assets/ios-toggle-light.png)
| ![Proposed
Toggle](https://github.com/ionic-team/ionic-framework-design-documents/raw/0a820657b7374deff227e83dd2f9925b89eccaca/projects/ionic-framework/ios-17/assets/proposed-toggle-light.png)
| ![Ionic
Toggle](https://github.com/ionic-team/ionic-framework-design-documents/raw/0a820657b7374deff227e83dd2f9925b89eccaca/projects/ionic-framework/ios-17/assets/ionic-toggle-light.png)
|


## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- The Toggle handle box shadow matches iOS 17 specs
- The Toggle height matches iOS 17 specs

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/.github/CONTRIBUTING.md#footer
for more information.
-->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->

---------

Co-authored-by: ionitron <[email protected]>
  • Loading branch information
mapsandapps and Ionitron authored Dec 21, 2023
1 parent 45907aa commit 0ce0693
Show file tree
Hide file tree
Showing 178 changed files with 2 additions and 2 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
4 changes: 2 additions & 2 deletions core/src/components/toggle/toggle.ios.vars.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
$toggle-ios-width: 51px !default;

/// @prop - Height of the toggle
$toggle-ios-height: 32px !default;
$toggle-ios-height: 31px !default;

/// @prop - Border width of the toggle
$toggle-ios-border-width: 2px !default;
Expand All @@ -32,7 +32,7 @@ $toggle-ios-handle-max-height: calc(100% - (var(--handle-spacing) * 2))
$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 12px rgba(0, 0, 0, .16), 0 3px 1px rgba(0, 0, 0, .1) !default;
$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;
Expand Down

0 comments on commit 0ce0693

Please sign in to comment.