-
Notifications
You must be signed in to change notification settings - Fork 123
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MarkBind does not support the inclusion of Google's Material icons using the two-colon syntax (e.g., `:icon-name:`). Users who want to use icons from that library would need to include `link` HTML elements per MarkBind project and write lengthy `span` HTML elements per icon, which can be inconvenient if done frequently. Let's extend MarkBind's existing two-colon icon syntax to support Google's Material icons. Using the two-colon syntax would make the usage of Google's Material icons much easier, as it does not require the users to manually use HTML to include said icons.
- Loading branch information
Showing
196 changed files
with
15,166 additions
and
60 deletions.
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
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; |
24 changes: 24 additions & 0 deletions
24
packages/cli/test/functional/test_site/expected/markbind/material-icons/filled.css
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,24 @@ | ||
@font-face { | ||
font-family: "Material Icons"; | ||
font-style: normal; | ||
font-weight: 400; | ||
font-display: block; | ||
src: url("./material-icons.woff2") format("woff2"), url("./material-icons.woff") format("woff"); | ||
} | ||
.material-icons { | ||
font-family: "Material Icons"; | ||
font-weight: normal; | ||
font-style: normal; | ||
font-size: 24px; | ||
line-height: 1; | ||
letter-spacing: normal; | ||
text-transform: none; | ||
display: inline-block; | ||
white-space: nowrap; | ||
word-wrap: normal; | ||
direction: ltr; | ||
-webkit-font-smoothing: antialiased; | ||
-moz-osx-font-smoothing: grayscale; | ||
text-rendering: optimizeLegibility; | ||
font-feature-settings: "liga"; | ||
} |
4 changes: 4 additions & 0 deletions
4
packages/cli/test/functional/test_site/expected/markbind/material-icons/filled.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,4 @@ | ||
@import 'variables'; | ||
@import 'mixins'; | ||
|
||
@include material-icons-font('Material Icons'); |
Binary file added
BIN
+159 KB
...i/test/functional/test_site/expected/markbind/material-icons/material-icons-outlined.woff
Binary file not shown.
Binary file added
BIN
+136 KB
.../test/functional/test_site/expected/markbind/material-icons/material-icons-outlined.woff2
Binary file not shown.
Binary file added
BIN
+180 KB
.../cli/test/functional/test_site/expected/markbind/material-icons/material-icons-round.woff
Binary file not shown.
Binary file added
BIN
+153 KB
...cli/test/functional/test_site/expected/markbind/material-icons/material-icons-round.woff2
Binary file not shown.
Binary file added
BIN
+137 KB
.../cli/test/functional/test_site/expected/markbind/material-icons/material-icons-sharp.woff
Binary file not shown.
Binary file added
BIN
+119 KB
...cli/test/functional/test_site/expected/markbind/material-icons/material-icons-sharp.woff2
Binary file not shown.
Binary file added
BIN
+295 KB
...i/test/functional/test_site/expected/markbind/material-icons/material-icons-two-tone.woff
Binary file not shown.
Binary file added
BIN
+186 KB
.../test/functional/test_site/expected/markbind/material-icons/material-icons-two-tone.woff2
Binary file not shown.
Oops, something went wrong.