mirror of
https://github.com/johndoe6345789/metabuilder.git
synced 2026-04-24 13:54:57 +00:00
50 lines
1.4 KiB
SCSS
50 lines
1.4 KiB
SCSS
@use 'sass:string';
|
|
|
|
$material-symbols-font-path: './' !default;
|
|
|
|
// @see https://github.com/twbs/bootstrap/blob/main/scss/_functions.scss
|
|
@function material-symbols-str-replace($string, $search, $replace: '') {
|
|
$index: string.index($string, $search);
|
|
@if $index {
|
|
@return string.slice($string, 1, $index - 1) + $replace +
|
|
material-symbols-str-replace(
|
|
string.slice($string, $index + string.length($search)),
|
|
$search,
|
|
$replace
|
|
);
|
|
}
|
|
@return $string;
|
|
}
|
|
|
|
@mixin material-symbols-font($font-family) {
|
|
$class-name: string.to-lower-case($font-family);
|
|
$class-name: material-symbols-str-replace($class-name, ' ', '-');
|
|
$font-file: $material-symbols-font-path + $class-name;
|
|
|
|
@font-face {
|
|
font-family: $font-family;
|
|
font-style: normal;
|
|
font-weight: 100 700;
|
|
font-display: block;
|
|
src: url('#{$font-file}.woff2') format('woff2');
|
|
}
|
|
|
|
.#{$class-name} {
|
|
font-family: $font-family;
|
|
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; // 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
|
|
}
|
|
}
|