owenasteel
owenasteel

Reputation: 69

Is there a universal form of “-webkit-font-smoothing”?

So, I’m trying to make my website look as crisp and as clear as possible (as is the goal these days), and was wondering if one of my favourite lines to use to achieve this (“-webkit-font-smoothing: antialiased;”) has a similar counterpart which works universally and has the same effect? Or, are there different ways for different browsers?

Upvotes: 0

Views: 82

Answers (2)

bron
bron

Reputation: 1548

Using pure browser specific css is not the best approach. I think the code below is enough for browser compatibility (add ofcourse your font, background, color, etc.).

html {
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  /* font-size relative to 100% of device-font-size */
  font-size: 1rem; 
}

Upvotes: 1

Jacob Adams
Jacob Adams

Reputation: 11

If i understand correctly you are may need to use vendor prefixes to achieve what you want with supporting multiple browsers.

Upvotes: 1

Related Questions