Skip to content

Commit 5cc8adb

Browse files
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. -->
1 parent a6016f8 commit 5cc8adb

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

core/src/components/chip/chip.ionic.scss

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,25 +60,27 @@
6060
--border-radius: #{globals.$ion-border-radius-0};
6161
}
6262

63-
// Chip Icon
64-
// ---------------------------------------------
65-
::slotted(ion-icon) {
66-
font-size: globals.$ion-font-size-400;
67-
}
68-
6963
// Size
7064
// ---------------------------------------------
7165

7266
:host(.chip-small) {
7367
min-height: globals.$ion-scale-600;
7468

7569
font-size: globals.$ion-font-size-300;
70+
71+
::slotted(ion-icon) {
72+
font-size: globals.$ion-font-size-300;
73+
}
7674
}
7775

7876
:host(.chip-large) {
7977
min-height: globals.$ion-scale-800;
8078

8179
font-size: globals.$ion-font-size-350;
80+
81+
::slotted(ion-icon) {
82+
font-size: globals.$ion-font-size-400;
83+
}
8284
}
8385

8486
// Subtle Chip

0 commit comments

Comments
 (0)