Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request COmanage#42 from arlen/feature-co2445-addFont
Add font files (CO-2445)
arlen committed Sep 9, 2022
2 parents 658df39 + a617ab1 commit 6826c6e
Showing 29 changed files with 20,793 additions and 0 deletions.
55 changes: 55 additions & 0 deletions app/webroot/css/fonts/material-icons/_mixins.scss
@@ -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 app/webroot/css/fonts/material-icons/_variables.scss
@@ -0,0 +1,3 @@
$material-icons-font-path: './' !default;
$material-icons-font-size: 24px !default;
$material-icons-font-display: block !default;

0 comments on commit 6826c6e

Please sign in to comment.