-moz-osx-font-smoothing entfernen
bearbeitet von
@@Elena Tork
> Ich habe im CSS-Bereich des Themes folgendes ausprobiert:
So meinte [Linda](https://forum.selfhtml.org/cites/231) das nicht. 😉
> ```css
> style {
> -webkit-font-smoothing: initial;
> -moz-osx-font-smoothing: initial;
> }
> ```
Das gilt für alle `style`-Elemente. Da diese (der CSS-Code darin) gar nicht angezeigt werden, ist das sinnfrei.
> ```css
> .style {
> -webkit-font-smoothing: initial!important;
> -moz-osx-font-smoothing: initial!important;
> }
>
> .body {
> -webkit-font-smoothing: initial!important;
> -moz-osx-font-smoothing: initial!important;
> }
> ```
Das gilt für alle Elemente, die der **Klasse** `"style"` bzw. `"body"` angehören. Git es solche? Vermutlich nicht.
> ```css
> body {
> -webkit-font-smoothing: initial!important;
> -moz-osx-font-smoothing: initial!important;
> }
> ```
Hier kommen wir der Sache schon näher. Die Eigenschaften sind aber von deinem Theme nicht für `body` gesetzt, sondern für `[class*=" icon-oc-"], [class^="icon-oc-"]`{:.language-css}. Also für alle Elemente, wo im Wert ihres `class`-Attributs `" icon-oc-"` (mit Leerzeichen davor) enthalten ist oder die mit `"icon-oc-"` anfangen (d.h. wo eine Klasse enthalten ist, die mit `"icon-oc-"` anfängt).
Auch wenn dieses Font-Smoothing für `body` nicht gilt; für darin enthaltene Elemente einer Klasse, die mit `"icon-oc-"` anfängt, gilt es eben doch.
Du müsstest die Eigenschaften auch genau dafür wieder zurücksetzen. Wie ich [sagte](https://forum.selfhtml.org/self/2023/feb/21/moz-osx-font-smoothing-entfernen/1806373#m1806373): *„**für denselben Selektor setzen**, den das WP-Theme verwendet hat.“* Das sollte ohne `!important` gehen:
```css
[class*=" icon-oc-"], [class^="icon-oc-"] {
-webkit-font-smoothing: initial;
-moz-osx-font-smoothing: initial;
}
```
Oder du gehst radikal vor und setzt sie für alle Elemente zurück:
```css
* {
-webkit-font-smoothing: initial !important;
-moz-osx-font-smoothing: initial !important;
}
```
🖖 Живіть довго і процвітайте
{:@uk}
--
*„Im Vergleich mit Elon Musk bei Twitter ist ein Elefant im Porzellanladen eine Ballerina.“*
— @Grantscheam auf Twitter
-moz-osx-font-smoothing entfernen
bearbeitet von
@@Elena Tork
> Ich habe im CSS-Bereich des Themes folgendes ausprobiert:
So meinte [Linda](https://forum.selfhtml.org/cites/231) das nicht. 😉
> ```css
> style {
> -webkit-font-smoothing: initial;
> -moz-osx-font-smoothing: initial;
> }
> ```
Das gilt für alle `style`-Elemente. Da diese (der CSS-Code darin) gar nicht angezeigt werden, ist das sinnfrei.
> ```css
> .style {
> -webkit-font-smoothing: initial!important;
> -moz-osx-font-smoothing: initial!important;
> }
>
> .body {
> -webkit-font-smoothing: initial!important;
> -moz-osx-font-smoothing: initial!important;
> }
> ```
Das gilt für alle Elemente, die der **Klasse** `"style"` bzw. `"body"` angehören. Git es solche? Vermutlich nicht.
> ```css
> body {
> -webkit-font-smoothing: initial!important;
> -moz-osx-font-smoothing: initial!important;
> }
> ```
Hier kommen wir der Sache schon näher. Die Eigenschaften sind aber von deinem Theme nicht für `body` gesetzt, sondern für `[class*=" icon-oc-"], [class^="icon-oc-"]`{:.language-css}. Also für alle Elemente, wo im Wert ihres `class`-Attributs `" icon-oc-"` (mit Leerzeichen davor) enthalten ist oder die mit `"icon-oc-"` anfangen (d.h. wo eine Klasse enthalten ist, die mit `"icon-oc-"` anfängt).
Du müsstest die Eigenschaften auch genau dafür wieder zurücksetzen. Wie ich [sagte](https://forum.selfhtml.org/self/2023/feb/21/moz-osx-font-smoothing-entfernen/1806373#m1806373): *„**für denselben Selektor setzen**, den das WP-Theme verwendet hat.“* Das sollte ohne `!important` gehen:
```css
[class*=" icon-oc-"], [class^="icon-oc-"] {
-webkit-font-smoothing: initial;
-moz-osx-font-smoothing: initial;
}
```
Oder du gehst radikal vor und setzt sie für alle Elemente zurück:
```css
* {
-webkit-font-smoothing: initial !important;
-moz-osx-font-smoothing: initial !important;
}
```
🖖 Живіть довго і процвітайте
{:@uk}
--
*„Im Vergleich mit Elon Musk bei Twitter ist ein Elefant im Porzellanladen eine Ballerina.“*
— @Grantscheam auf Twitter