-
Notifications
You must be signed in to change notification settings - Fork 2.1k
feat(icon): add font icon support to ion-icon #1499
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
06aaaaa
feat(icon): add support for slotted content
brandyscarney 175fed2
test(ionicons): refactor the tests to individual pages with shared st…
brandyscarney 6bf9274
test(icon): move all test files into the icon test folder
brandyscarney 3a2a57e
test(icon): consistent head tags and titles for tests
brandyscarney a295aef
test(icon): fix screenshots and naming
brandyscarney 77ca364
chore(): add updated snapshots
Ionitron ed357ea
chore(testing): update test to run spec and e2e and document it
brandyscarney 99cb543
chore(deps): update to playwright and jest to resolve errors
brandyscarney 54aff8e
test(icon): fix sanitization test and add e2e test
brandyscarney 00a2169
test(icon): add a11y test for icon
brandyscarney 4cea47b
chore(prettier): ignore components file and run prettier on test files
brandyscarney 4bb43d8
chore(deps): update stencil to latest
brandyscarney bf00f5a
chore(): add updated snapshots
Ionitron a912828
revert(icon): revert slotted font support
brandyscarney 58ca62c
Revert "revert(icon): revert slotted font support"
brandyscarney 4dfa798
test(icon): add tests for slotted font icons
brandyscarney f5157b9
chore(): add updated snapshots
Ionitron 51f33b5
fix(icon): remove double div on svgs and render height correctly
brandyscarney c794397
test(icon): lint and fix paths
brandyscarney c7205a2
test(icon): add spec tests for svg rendering
brandyscarney f2f328f
style: lint
brandyscarney cd916b1
test(csp): fix import path
brandyscarney e6a33bb
chore(build): remove duplicate copy task
brandyscarney e5e7bcd
Merge branch 'chore/ionicons-align-build-tests' into FW-7618
brandyscarney a6d9b8c
test(icon): fix a11y test
brandyscarney dfd6b88
test(icon): fix asset path
brandyscarney 182a7ed
chore: delete snapshots to regenerate
brandyscarney 0d622f4
chore(): add updated snapshots
Ionitron 96b9ead
Merge branch 'chore/ionicons-align-build-tests' into FW-7618
brandyscarney f1fb490
test(icon): capture smaller screenshots
brandyscarney f6bbf01
chore(): add updated snapshots
Ionitron 207c009
Merge branch 'chore/ionicons-align-build-tests' into FW-7618
brandyscarney 1fa116b
chore(): add updated snapshots
Ionitron 7290eb5
Merge branch 'main' into FW-7618
brandyscarney a818214
docs(readme): update release process
brandyscarney 06400e9
test(icon): add size test and e2e tests
brandyscarney e15c0b8
chore(): add updated snapshots
Ionitron File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| const Stencil = require('@stencil/core'); | ||
| Stencil.Build.isBrowser = true; | ||
|
Comment on lines
+1
to
+2
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,12 +4,13 @@ | |
| width: 1em; | ||
| height: 1em; | ||
|
|
||
| contain: strict; | ||
| font-size: 1em; | ||
|
|
||
| contain: layout style; | ||
|
|
||
| fill: currentColor; | ||
|
|
||
| box-sizing: content-box !important; | ||
|
|
||
| } | ||
|
|
||
| :host .ionicon { | ||
|
|
@@ -24,7 +25,16 @@ | |
| stroke-width: var(--ionicon-stroke-width, 32px); | ||
| } | ||
|
|
||
| .icon-inner, | ||
| .icon-inner { | ||
| display: flex; | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We need flex here for the font icons, otherwise they are shifted to the right and down. Since developers can't override this, we could expose this as a part if it's an issue. |
||
|
|
||
| align-items: center; | ||
| justify-content: center; | ||
|
|
||
| width: 100%; | ||
| height: 100%; | ||
| } | ||
|
|
||
| .ionicon, | ||
| svg { | ||
| display: block; | ||
|
|
@@ -33,6 +43,14 @@ svg { | |
| width: 100%; | ||
| } | ||
|
|
||
| /* Slotted Content | ||
| * ----------------------------------------------------------- | ||
| */ | ||
|
|
||
| ::slotted(*) { | ||
| font-size: inherit !important; | ||
| } | ||
|
|
||
| /* Icon RTL | ||
| * ----------------------------------------------------------- | ||
| */ | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+6.01 KB
(190%)
...st/dynamic-type/icon.e2e.ts-snapshots/icon-dynamic-type-Mobile-Chrome-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+6.79 KB
(190%)
...t/dynamic-type/icon.e2e.ts-snapshots/icon-dynamic-type-Mobile-Firefox-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+7.43 KB
(190%)
...st/dynamic-type/icon.e2e.ts-snapshots/icon-dynamic-type-Mobile-Safari-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.