Skip to content

Commit

Permalink
fix(toggle): set switch icon color correctly (#28812)
Browse files Browse the repository at this point in the history
Issue number: None

---------

<!-- 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. -->
Similar to #28809, in my work for FW-5822, I found that I had unexpected
screenshot diffs. `--ion-color-dark` was not defined in our test
infrastructure, and this toggle icon was therefore displaying in the
wrong color in the tests.

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

- Toggle has the correct icon color even when the --ion-color-dark token
is not defined

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

Introduces style changes if the token is undefined, but it should always
be defined in real-world uses.

<!--
  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 Jan 10, 2024
1 parent 3929b01 commit 749df5b
Show file tree
Hide file tree
Showing 13 changed files with 1 addition and 1 deletion.
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.
2 changes: 1 addition & 1 deletion core/src/components/toggle/toggle.ios.scss
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
.toggle-switch-icon {
position: absolute;

color: var(--ion-color-dark);
color: #{ion-color(dark, base)};
}

:host(.toggle-ltr) .toggle-switch-icon {
Expand Down

0 comments on commit 749df5b

Please sign in to comment.