fix(chip): scale slotted icon size by chip size (#30961)

Issue number: resolves 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. -->
When an icon was placed within a chip, the icon size was the same
regardless of the chip size.

## What is the new behavior?
Scales the size of the icon based on design specifications.

## 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/docs/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. -->
This commit is contained in:
Susmita Bhowmik
2026-02-20 08:09:19 -07:00
committed by GitHub
parent a6016f85bd
commit 5cc8adb1d5

View File

@@ -60,12 +60,6 @@
--border-radius: #{globals.$ion-border-radius-0};
}
// Chip Icon
// ---------------------------------------------
::slotted(ion-icon) {
font-size: globals.$ion-font-size-400;
}
// Size
// ---------------------------------------------
@@ -73,12 +67,20 @@
min-height: globals.$ion-scale-600;
font-size: globals.$ion-font-size-300;
::slotted(ion-icon) {
font-size: globals.$ion-font-size-300;
}
}
:host(.chip-large) {
min-height: globals.$ion-scale-800;
font-size: globals.$ion-font-size-350;
::slotted(ion-icon) {
font-size: globals.$ion-font-size-400;
}
}
// Subtle Chip