lqez
lqez

Reputation: 3008

Apply different styles by the result of computed styles

How can I apply different styles by the result of computed styles?

This can be done via JavaScript, but I'm finding a CSS only solution.

e.g.

body { font-family: Helvetica, Arial, Segoe UI; }

In above case, I would like to apply letter-spacing: -0.5px only for Arial, not others.

Upvotes: 0

Views: 60

Answers (1)

SoliMoli
SoliMoli

Reputation: 786

Use this attr: https://www.w3.org/International/questions/qa-css-lang.en (I guess CSS can't figure out text's fonts types. You need to use scss(sass) or JS.)

:lang(ta)   {
    font-family: Latha, "Tamil MN", serif;
    font-size: 120%;
    }

Upvotes: 1

Related Questions