linaria icon indicating copy to clipboard operation
linaria copied to clipboard

Weird "font-feature-settings" being applied

Open hyoretsu opened this issue 3 years ago • 3 comments

Environment

  • Linaria version: 2.1.0
  • Bundler (+ version): Webpack 5 (Next.js 11.0.1)
  • Node.js version: 14.16.0
  • OS: Ubuntu 20.04

Description

These are the only styles I've applied to a Header:

 background: #e7e7e7;
 display: flex;
 flex-direction: column;
 width: auto;
 font-variant: small-caps;

However, these are the styles being generated:

 background: #e7e7e7;
 display: flex;
 flex-direction: column;
 width: auto;
 font-feature-settings: "c2sc";
 font-variant: small-caps;

Notice how font-feature-settings: "c2sc"; appeared out of nowhere. Even if there's some sort of optimization I don't know about, it messes up my fonts.

hyoretsu avatar Jun 30 '21 22:06 hyoretsu

Linaria uses stylis for basic styles processing, but as far as I can see, it has nothing to do with font-feature-settings. Please check the config of your custom CSS post/pre-processor.

Anber avatar Jul 11 '21 08:07 Anber

The config is nothing. I literally didn't know that property existed until it happened. https://github.com/hyoretsu/aufklarung-site/blob/main/next.config.ts And it only started happening after switching from Styled Components to Linaria.

I even disabled some (all) processors because I also made a React->Next.js migration during that time.

hyoretsu avatar Jul 11 '21 11:07 hyoretsu

Unfortunately I can't re-open the issue, but this still happens with no CSS configurations other than Linaria, even in production.

hyoretsu avatar Jul 16 '21 00:07 hyoretsu

This issue is old and don't have a reproduction case, the linked config for Next.js is dead. Please try latest versions and create a new issue if it still happens.

layershifter avatar Sep 30 '23 18:09 layershifter