-
Notifications
You must be signed in to change notification settings - Fork 244
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
🔧 Add icomoon #1149
Merged
sebastianbenz
merged 3 commits into
ampproject:main
from
lluerich:update/known-icon-fonts
Feb 26, 2021
Merged
🔧 Add icomoon #1149
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
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 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 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 removed
BIN
-200 KB
packages/linter/tests/local/NoIconFontIsUsed-1/fontawesome/webfonts/fa-solid-900.eot
Binary file not shown.
5,028 changes: 0 additions & 5,028 deletions
5,028
...ges/linter/tests/local/NoIconFontIsUsed-1/fontawesome/webfonts/fa-solid-900.svg
This file was deleted.
Oops, something went wrong.
Binary file removed
BIN
-200 KB
packages/linter/tests/local/NoIconFontIsUsed-1/fontawesome/webfonts/fa-solid-900.ttf
Binary file not shown.
Binary file removed
BIN
-102 KB
packages/linter/tests/local/NoIconFontIsUsed-1/fontawesome/webfonts/fa-solid-900.woff
Binary file not shown.
Binary file removed
BIN
-78.4 KB
packages/linter/tests/local/NoIconFontIsUsed-1/fontawesome/webfonts/fa-solid-900.woff2
Binary file not shown.
57 changes: 57 additions & 0 deletions
57
packages/linter/tests/local/NoIconFontIsUsed-5/source.html
This file contains 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,57 @@ | ||
<!doctype html> | ||
<html amp lang="en"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<script async src="https://cdn.ampproject.org/v0.js"></script> | ||
<title>Hello, AMPs</title> | ||
<link rel="canonical" href="http://example.ampproject.org/article-metadata.html"> | ||
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1"> | ||
<script type="application/ld+json"> | ||
{ | ||
"@context": "http://schema.org", | ||
"@type": "NewsArticle", | ||
"headline": "Open-source framework for publishing content", | ||
"datePublished": "2015-10-07T12:02:41Z", | ||
"image": [ | ||
"logo.jpg" | ||
] | ||
} | ||
</script> | ||
<style amp-boilerplate>body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}</style><noscript><style amp-boilerplate>body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}</style></noscript> | ||
<style amp-custom> | ||
@font-face { | ||
font-family: 'icomoon'; | ||
src: url('fonts/icomoon.eot?72kag1'); | ||
src: url('fonts/icomoon.eot?72kag1#iefix') format('embedded-opentype'), | ||
url('fonts/icomoon.ttf?72kag1') format('truetype'), | ||
url('fonts/icomoon.woff?72kag1') format('woff'), | ||
url('fonts/icomoon.svg?72kag1#icomoon') format('svg'); | ||
font-weight: normal; | ||
font-style: normal; | ||
font-display: block; | ||
} | ||
|
||
[class^="icon-"], [class*=" icon-"] { | ||
/* use !important to prevent issues with browser extensions that change fonts */ | ||
font-family: 'icomoon' !important; | ||
speak: never; | ||
font-style: normal; | ||
font-weight: normal; | ||
font-variant: normal; | ||
text-transform: none; | ||
line-height: 1; | ||
|
||
/* Better Font Rendering =========== */ | ||
-webkit-font-smoothing: antialiased; | ||
-moz-osx-font-smoothing: grayscale; | ||
} | ||
|
||
.icon-power:before { | ||
content: "\e9b5"; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<h1>Hello, AMP!<span class="icon-power"></span></h1> | ||
</body> | ||
</html> |
54 changes: 54 additions & 0 deletions
54
packages/linter/tests/local/NoIconFontIsUsed-6/source.html
This file contains 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,54 @@ | ||
<!doctype html> | ||
<html amp lang="en"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<script async src="https://cdn.ampproject.org/v0.js"></script> | ||
<title>Hello, AMPs</title> | ||
<link rel="canonical" href="http://example.ampproject.org/article-metadata.html"> | ||
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1"> | ||
<script type="application/ld+json"> | ||
{ | ||
"@context": "http://schema.org", | ||
"@type": "NewsArticle", | ||
"headline": "Open-source framework for publishing content", | ||
"datePublished": "2015-10-07T12:02:41Z", | ||
"image": [ | ||
"logo.jpg" | ||
] | ||
} | ||
</script> | ||
<style amp-boilerplate>body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}</style><noscript><style amp-boilerplate>body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}</style></noscript> | ||
<style amp-custom> | ||
@font-face { | ||
font-family: "IcoFont"; | ||
font-weight: normal; | ||
font-style: "Regular"; | ||
src: url("./fonts/icofont.woff2") format("woff2"), | ||
url("./fonts/icofont.woff") format("woff"); | ||
} | ||
|
||
[class^="icofont-"], [class*=" icofont-"] { | ||
font-family: 'IcoFont' !important; | ||
speak: none; | ||
font-style: normal; | ||
font-weight: normal; | ||
font-variant: normal; | ||
text-transform: none; | ||
white-space: nowrap; | ||
word-wrap: normal; | ||
direction: ltr; | ||
line-height: 1; | ||
/* Better Font Rendering =========== */ | ||
-webkit-font-feature-settings: "liga"; | ||
-webkit-font-smoothing: antialiased; | ||
} | ||
|
||
.icofont-thunder-light:before { | ||
content: "\ee84"; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<h1>Hello, AMP!<i class="icofont-thunder-light"></i></h1> | ||
</body> | ||
</html> |
50 changes: 50 additions & 0 deletions
50
packages/linter/tests/local/NoIconFontIsUsed-7/source.html
This file contains 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,50 @@ | ||
<!doctype html> | ||
<html amp lang="en"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<script async src="https://cdn.ampproject.org/v0.js"></script> | ||
<title>Hello, AMPs</title> | ||
<link rel="canonical" href="http://example.ampproject.org/article-metadata.html"> | ||
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1"> | ||
<script type="application/ld+json"> | ||
{ | ||
"@context": "http://schema.org", | ||
"@type": "NewsArticle", | ||
"headline": "Open-source framework for publishing content", | ||
"datePublished": "2015-10-07T12:02:41Z", | ||
"image": [ | ||
"logo.jpg" | ||
] | ||
} | ||
</script> | ||
<style amp-boilerplate>body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}</style><noscript><style amp-boilerplate>body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}</style></noscript> | ||
<style amp-custom> | ||
@font-face { | ||
font-family: 'NerdFontsSymbols Nerd Font'; | ||
src: url("./fonts/Noto Sans Regular Nerd Font Complete.ttf") format("truetype"); | ||
font-weight: normal; | ||
font-style: normal; | ||
} | ||
|
||
.nf, .nerd-font, .nerd-fonts { | ||
font-family: 'NerdFontsSymbols Nerd Font'; | ||
speak: none; | ||
font-style: normal; | ||
font-weight: normal; | ||
font-variant: normal; | ||
text-transform: none; | ||
line-height: 1; | ||
/* Better Font Rendering (from devicons, et al) */ | ||
-webkit-font-smoothing: antialiased; | ||
-moz-osx-font-smoothing: grayscale; | ||
} | ||
|
||
.nf-fa-bolt:before { | ||
content: "\f0e7"; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<h1>Hello, AMP!<i class="nf nf-fa-bolt"></i></h1> | ||
</body> | ||
</html> |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a test case? Have we already got tests for all the icon font providers?