From 8e4ef80581474a70b49fa9f262fa990de08edd94 Mon Sep 17 00:00:00 2001 From: Sebastian Thulin Date: Fri, 9 Aug 2024 15:50:46 +0200 Subject: [PATCH 1/2] fix: update css for material icons. --- source/sass/icon/_material-symbols.scss | 29 ++++++------------------- 1 file changed, 7 insertions(+), 22 deletions(-) diff --git a/source/sass/icon/_material-symbols.scss b/source/sass/icon/_material-symbols.scss index 7a28891be..9408a2533 100644 --- a/source/sass/icon/_material-symbols.scss +++ b/source/sass/icon/_material-symbols.scss @@ -1,5 +1,7 @@ -.material-symbols-outlined { - font-family: 'Material Symbols Outlined'; +/* Support all types */ +.material-symbols, +.material-icons { + font-family: 'Material Symbols Outlined', 'Material Symbols Rounded', 'Material Symbols Sharp'; font-style: normal; font-size: calc($base * 3); letter-spacing: normal; @@ -18,10 +20,10 @@ 'GRAD' 0, 'opsz' 24; - &.material-symbols-outlined--filled { + &--filled { font-variation-settings: 'FILL' 1, - 'wght' 400, + 'wght' var(--current-material-symbols-weight, 400), 'GRAD' 0, 'opsz' 24; } @@ -29,21 +31,4 @@ &::after { content: attr(material-symbol); } -} - -/* Legacy icons */ -.material-icons { - font-family: 'Material Symbols Outlined'; - font-weight: normal; - font-style: normal; - font-size: calc($base * 3); - line-height: 1; - letter-spacing: normal; - text-transform: none; - display: inline-block; - white-space: nowrap; - word-wrap: normal; - direction: ltr; - text-rendering: optimizeLegibility; - -webkit-font-smoothing: antialiased; - } \ No newline at end of file +} \ No newline at end of file From 72f50237c3671e4759dc746bcfa0713168a81149 Mon Sep 17 00:00:00 2001 From: Sebastian Thulin Date: Fri, 9 Aug 2024 16:25:12 +0200 Subject: [PATCH 2/2] fix: implement css vars for settings of icons. --- source/sass/component/_blockquote.scss | 8 ++++---- source/sass/icon/_material-symbols.scss | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/source/sass/component/_blockquote.scss b/source/sass/component/_blockquote.scss index c3cf22787..09a2c7c65 100644 --- a/source/sass/component/_blockquote.scss +++ b/source/sass/component/_blockquote.scss @@ -17,15 +17,15 @@ blockquote { &::before, &::after { - font-family: 'Material Symbols Outlined'; + font-family: 'Material Symbols Outlined', 'Material Symbols Rounded', 'Material Symbols Sharp'; content: '\e244'; position: absolute; font-size: calc($base * 4); font-variation-settings: 'FILL' 1, - 'wght' 400, - 'GRAD' 0, - 'opsz' 24; + 'wght' var(--current-material-symbols-weight, 400), + 'GRAD' var(--current-material-symbols-grade, 0), + 'opsz' var(--current-material-symbols-optical-size, 48); } &::before { diff --git a/source/sass/icon/_material-symbols.scss b/source/sass/icon/_material-symbols.scss index 9408a2533..a67e77292 100644 --- a/source/sass/icon/_material-symbols.scss +++ b/source/sass/icon/_material-symbols.scss @@ -16,16 +16,16 @@ font-variation-settings: 'FILL' 0, - 'wght' 400, - 'GRAD' 0, - 'opsz' 24; + 'wght' var(--current-material-symbols-weight, 400), + 'GRAD' var(--current-material-symbols-grade, 0), + 'opsz' var(--current-material-symbols-optical-size, 48); &--filled { font-variation-settings: 'FILL' 1, 'wght' var(--current-material-symbols-weight, 400), - 'GRAD' 0, - 'opsz' 24; + 'GRAD' var(--current-material-symbols-grade, 0), + 'opsz' var(--current-material-symbols-optical-size, 48); } &::after {