Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions core/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"dependencies": {
"@phosphor-icons/core": "^2.1.1",
"@stencil/core": "4.43.5",
"ionicons": "^8.0.13",
"ionicons": "^8.0.14-dev.11784821417.1c794397",
Comment thread
ShaneK marked this conversation as resolved.
"tslib": "^2.1.0"
},
"devDependencies": {
Expand Down
18 changes: 6 additions & 12 deletions core/src/components/avatar/avatar.ionic.scss
Original file line number Diff line number Diff line change
Expand Up @@ -140,33 +140,27 @@
}

:host(.avatar-xxsmall) ::slotted(ion-icon) {
width: globals.$ion-scale-300;
height: globals.$ion-scale-300;
font-size: globals.$ion-font-size-300;
}

:host(.avatar-xsmall) ::slotted(ion-icon) {
width: globals.$ion-scale-400;
height: globals.$ion-scale-400;
font-size: globals.$ion-font-size-400;
}

:host(.avatar-small) ::slotted(ion-icon) {
width: globals.$ion-scale-500;
height: globals.$ion-scale-500;
font-size: globals.$ion-font-size-500;
}

:host(.avatar-medium) ::slotted(ion-icon) {
width: globals.$ion-scale-600;
height: globals.$ion-scale-600;
font-size: globals.$ion-font-size-600;
}

:host(.avatar-large) ::slotted(ion-icon) {
width: globals.$ion-scale-700;
height: globals.$ion-scale-700;
font-size: globals.$ion-font-size-700;
}

:host(.avatar-xlarge) ::slotted(ion-icon) {
width: globals.$ion-scale-800;
height: globals.$ion-scale-800;
font-size: globals.$ion-font-size-800;
}

// Avatar Badge Empty (hint)
Expand Down
9 changes: 3 additions & 6 deletions core/src/components/badge/badge.ionic.scss
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,7 @@
}

:host(.badge-small) ::slotted(ion-icon) {
width: globals.$ion-scale-300;
height: globals.$ion-scale-300;
font-size: globals.$ion-font-size-300;
}

/* Medium Badge */
Expand All @@ -100,8 +99,7 @@

:host(.badge-medium) ::slotted(ion-icon),
:host(.badge-large) ::slotted(ion-icon) {
width: globals.$ion-scale-400;
height: globals.$ion-scale-400;
font-size: globals.$ion-font-size-400;
}

// Badge (hint)
Expand Down Expand Up @@ -170,7 +168,6 @@
height: globals.$ion-scale-400;

::slotted(ion-icon) {
width: globals.$ion-scale-300;
height: globals.$ion-scale-300;
font-size: globals.$ion-font-size-300;
}
}
5 changes: 2 additions & 3 deletions core/src/components/badge/badge.ios.scss
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@

position: absolute;

width: $badge-ios-in-tab-button-icon-size;
height: $badge-ios-in-tab-button-icon-size;

transform: translate(-50%, -50%);

font-size: $badge-ios-in-tab-button-icon-size;
}
3 changes: 1 addition & 2 deletions core/src/components/badge/badge.native.scss
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@
line-height: $badge-line-height-in-button;

::slotted(ion-icon) {
width: $badge-icon-size-in-button;
height: $badge-icon-size-in-button;
font-size: $badge-icon-size-in-button;
}
}
6 changes: 2 additions & 4 deletions core/src/components/button/button.ionic.scss
Original file line number Diff line number Diff line change
Expand Up @@ -143,17 +143,15 @@
::slotted(ion-icon[slot="start"]),
::slotted(ion-icon[slot="end"]),
::slotted(ion-icon[slot="icon-only"]) {
width: globals.$ion-scale-500;
height: globals.$ion-scale-500;
font-size: globals.$ion-font-size-500;
}
}

:host(.button-large) {
::slotted(ion-icon[slot="start"]),
::slotted(ion-icon[slot="end"]),
::slotted(ion-icon[slot="icon-only"]) {
width: globals.$ion-scale-600;
height: globals.$ion-scale-600;
font-size: globals.$ion-font-size-600;
}
}

Expand Down
2 changes: 1 addition & 1 deletion core/src/components/buttons/buttons.ionic.scss
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@
}

::slotted(*) ion-icon[slot="icon-only"] {
font-size: globals.$ion-font-size-600;
font-size: globals.$ion-font-size-500;

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This was not using the correct value before. The change to other components to use font-size with ion-icon exposed this as the wrong size.

}
34 changes: 34 additions & 0 deletions core/src/components/icon/test/font/icon.e2e.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import { expect } from '@playwright/test';
import { configs, test } from '@utils/test/playwright';

configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
test.describe(title('icon: font'), () => {
test('should render font icon when passed', async ({ page }) => {
await page.setContent(
`
<link
rel="stylesheet"
type="text/css"
href="https://cdn.jsdelivr.net/npm/@phosphor-icons/web@2.1.1/src/fill/style.css"
/>

<style>
ion-icon {
font-size: 32px;
}
</style>

<ion-icon>
<i class="ph-fill ph-house"></i>
</ion-icon>
`,
config
);

await page.evaluate(() => document.fonts.ready);

const icon = page.locator('ion-icon');
await expect(icon).toHaveScreenshot(screenshot(`icon-font`));
Comment thread
ShaneK marked this conversation as resolved.
});
});
});
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
Loading