From 489ef28cfc8a5120d360cf4567ffb3582433c4c0 Mon Sep 17 00:00:00 2001 From: Jeri Peier Date: Wed, 4 Sep 2024 14:47:36 +0200 Subject: [PATCH] refactor: remove font-smoothing (#3052) --- src/elements/button/common/button-common.scss | 1 - src/elements/core/styles/mixins/panel.scss | 2 -- src/elements/core/styles/mixins/typo.scss | 30 ------------------- src/elements/tabs/tab-label/tab-label.scss | 2 -- src/elements/teaser-hero/teaser-hero.scss | 4 --- 5 files changed, 39 deletions(-) diff --git a/src/elements/button/common/button-common.scss b/src/elements/button/common/button-common.scss index 2b36dba67e..be4cbc4fc2 100644 --- a/src/elements/button/common/button-common.scss +++ b/src/elements/button/common/button-common.scss @@ -126,7 +126,6 @@ $icon-only: ':where([data-slot-names~=icon], [icon-name]):not([data-slot-names~= .sbb-action-base { @include sbb.text-xs--bold; - @include sbb.font-smoothing; // Reset for link variant text-decoration: none; diff --git a/src/elements/core/styles/mixins/panel.scss b/src/elements/core/styles/mixins/panel.scss index bd36ff34e2..b91a9b443b 100644 --- a/src/elements/core/styles/mixins/panel.scss +++ b/src/elements/core/styles/mixins/panel.scss @@ -67,8 +67,6 @@ } @mixin panel-text { - @include typo.font-smoothing; - font-family: var(--sbb-typo-font-family); font-size: var(--sbb-panel-font-size); font-weight: 300; diff --git a/src/elements/core/styles/mixins/typo.scss b/src/elements/core/styles/mixins/typo.scss index 45207fba16..a15653a275 100644 --- a/src/elements/core/styles/mixins/typo.scss +++ b/src/elements/core/styles/mixins/typo.scss @@ -12,8 +12,6 @@ --sbb-title-margin-block-end: var(--sbb-spacing-responsive-s); } - @include font-smoothing; - margin: 0; margin-block: var(--sbb-title-margin-block-start) var(--sbb-title-margin-block-end); font-family: var(--sbb-typo-font-family); @@ -169,34 +167,6 @@ text-align: inherit; } -// ---------------------------------------------------------------------------------------------------- -// Typo: Font Smoothing Mixins -// ---------------------------------------------------------------------------------------------------- - -/** - * Better font rendering (on OS X) - * http://maximilianhoffmann.com/posts/better-font-rendering-on-osx - * - * Usage: - * - * .var_dark_on_light { - * @include font-smoothing; - * } - * .var_light_on_dark { - * @include font-smoothing-reset; - * } - */ - -@mixin font-smoothing { - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} - -@mixin font-smoothing-reset { - -webkit-font-smoothing: subpixel-antialiased; - -moz-osx-font-smoothing: auto; -} - @mixin placeholder { color: var(--sbb-color-metal); -webkit-text-fill-color: var(--sbb-color-metal); diff --git a/src/elements/tabs/tab-label/tab-label.scss b/src/elements/tabs/tab-label/tab-label.scss index bf9d0a352a..391cdd1be2 100644 --- a/src/elements/tabs/tab-label/tab-label.scss +++ b/src/elements/tabs/tab-label/tab-label.scss @@ -165,7 +165,6 @@ color: var(--sbb-tab-label-color); transition: color var(--sbb-tab-label-animation-duration) var(--sbb-tab-label-animation-easing); - @include sbb.font-smoothing; @include sbb.ellipsis; @include sbb.text-m--bold; @@ -184,7 +183,6 @@ transition: color var(--sbb-tab-label-animation-duration) var(--sbb-tab-label-animation-easing); @include sbb.text-m--regular; - @include sbb.font-smoothing; :host(:not([data-slot-names~='amount'], [amount])) & { display: none; diff --git a/src/elements/teaser-hero/teaser-hero.scss b/src/elements/teaser-hero/teaser-hero.scss index de288345e2..dad3d5fa01 100644 --- a/src/elements/teaser-hero/teaser-hero.scss +++ b/src/elements/teaser-hero/teaser-hero.scss @@ -61,10 +61,6 @@ padding: 0; } -.sbb-teaser-hero__panel-link { - @include sbb.font-smoothing; -} - ::slotted([slot='image']), sbb-image { will-change: filter;