Skip to content

feat(icon): add font icon support to ion-icon - #31302

Open
brandyscarney wants to merge 5 commits into
major-9.0from
FW-7625
Open

feat(icon): add font icon support to ion-icon#31302
brandyscarney wants to merge 5 commits into
major-9.0from
FW-7625

Conversation

@brandyscarney

@brandyscarney brandyscarney commented Jul 28, 2026

Copy link
Copy Markdown
Member

Issue number: internal


What is the current behavior?

Ionicons added support for font icons in ion-icon, but Ionic Framework does not support it.

What is the new behavior?

  • Updates Ionicons to the latest release with font icon support
  • Adds a font test to the icon folder to verify font icon support works in Ionic Framework
  • Updates the components that style ion-icon using width/height to use font-size so it will style them for both SVGs and font icons.

Does this introduce a breaking change?

  • Yes
  • No

Other information

Preview: icon: font

@vercel

vercel Bot commented Jul 28, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ionic-framework Ready Ready Preview Jul 30, 2026 1:30pm

Request Review

@brandyscarney
brandyscarney marked this pull request as ready for review July 28, 2026 21:34
@brandyscarney
brandyscarney requested a review from a team as a code owner July 28, 2026 21:34
@brandyscarney
brandyscarney requested a review from ShaneK July 28, 2026 21:34

@ShaneK ShaneK left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm approving this with nits, but I do think the size issue is worth considering more (and may not actually be a nit if you agree it could be a problem)

import { expect } from '@playwright/test';
import { configs, test } from '@utils/test/playwright';

configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
/**
* Font icon rendering does not vary across modes/directions.
*/
configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {

Nit: could you add a note on why this is md/ltr only? We generally put a /** */ block above a restricted configs() call, like select-modal does. Up to you!

.select-option-end > ion-icon {
width: 28px;
height: 28px;
font-size: 28px;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think size might get past this now. ionicons applies font-size: 2rem !important for size="large" in its own shadow root, and an inner !important beats our outer rule, so a large icon measured 32px for me where the old width/height held it at 28px. The comment above mentions capping slotted content, so figured I'd flag it.

Adding !important here would keep the cap, or :not([size]) if you'd rather size win. Same in the MD file. Could be missing something though!

@thetaPC thetaPC left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once you verify what Shane said, then I can move forward with my decision.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

package: core @ionic/core package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants