-
Notifications
You must be signed in to change notification settings - Fork 123
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
Support Google Fonts Icons #1681
Merged
Merged
Changes from 17 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
02421d3
Install material-design-icons npm package
riyadh-h a6bfbb8
Update index.js
riyadh-h 4be84a4
Fix path statement typo
riyadh-h 622ad8d
Add link element to page.njk
riyadh-h a01eb3f
Add material-icons assets
riyadh-h 539acf1
Add google keyword to icon syntax
riyadh-h a80871d
Vertically-align icons with their surrounding text
riyadh-h 7f83701
Merge branch 'master' of https://github.com/MarkBind/markbind into fe…
riyadh-h cb068ad
Replace material-design-icons package with material-icons
riyadh-h 009c13f
Update package-lock.json
riyadh-h d763057
Update index.js
riyadh-h 9d339b3
Update and extend syntax to support different styles
riyadh-h 0d188ad
Fix code styling
riyadh-h 42cfbbb
Add and update tests
riyadh-h 86e6b49
Fix icon name formatting
riyadh-h 8c6500a
Update user guide
riyadh-h 2f964a5
Add acknowledgement
riyadh-h addc752
Remove unnecessary dependencies
riyadh-h 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
55 changes: 55 additions & 0 deletions
55
packages/cli/test/functional/test_site/expected/markbind/material-icons/_mixins.scss
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,55 @@ | ||
// @see https://github.com/twbs/bootstrap/blob/main/scss/_functions.scss | ||
@function material-icons-str-replace($string, $search, $replace: '') { | ||
$index: str-index($string, $search); | ||
@if $index { | ||
@return str-slice($string, 1, $index - 1) + $replace + | ||
material-icons-str-replace( | ||
str-slice($string, $index + str-length($search)), | ||
$search, | ||
$replace | ||
); | ||
} | ||
@return $string; | ||
} | ||
|
||
@mixin material-icons-font-class($font-family) { | ||
font-family: $font-family; | ||
font-weight: normal; | ||
font-style: normal; | ||
font-size: $material-icons-font-size; | ||
line-height: 1; | ||
letter-spacing: normal; | ||
text-transform: none; | ||
display: inline-block; | ||
white-space: nowrap; | ||
word-wrap: normal; | ||
direction: ltr; | ||
-webkit-font-smoothing: antialiased; // Support for all WebKit browsers | ||
-moz-osx-font-smoothing: grayscale; // Support for Firefox | ||
text-rendering: optimizeLegibility; // Support for Safari and Chrome | ||
font-feature-settings: 'liga'; // Support for IE | ||
} | ||
|
||
@mixin material-icons-font($font-family) { | ||
$class-name: to-lower-case($font-family); | ||
$class-name: material-icons-str-replace($class-name, ' ', '-'); | ||
$font-file: $material-icons-font-path + $class-name; | ||
|
||
@font-face { | ||
font-family: $font-family; | ||
font-style: normal; | ||
font-weight: 400; | ||
font-display: $material-icons-font-display; | ||
src: url('#{$font-file}.woff2') format('woff2'), | ||
url('#{$font-file}.woff') format('woff'); | ||
} | ||
|
||
.#{$class-name} { | ||
@include material-icons-font-class($font-family); | ||
} | ||
} | ||
|
||
@mixin material-icons() { | ||
@warn "material-icons() Sass mixin has been deprecated as of 1.0. Use '@extend .material-icons;' instead of '@include material-icons();'."; | ||
@include material-icons-font-class('Material Icons'); | ||
} |
3 changes: 3 additions & 0 deletions
3
packages/cli/test/functional/test_site/expected/markbind/material-icons/_variables.scss
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,3 @@ | ||
$material-icons-font-path: './' !default; | ||
$material-icons-font-size: 24px !default; | ||
$material-icons-font-display: block !default; |
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.
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 we remove the
material-icons
dependency from here since it does not seem to be used in this package? Same forcore-web
andvue-components
.