cssinjs / jss

JSS is an authoring tool for CSS which uses JavaScript as a host language.
https://cssinjs.org
MIT License
7.08k stars 399 forks source link

Multiple fallbacks for the same property name not working #1177

Closed maxcelima closed 5 years ago

maxcelima commented 5 years ago

Expected behavior: When an array is used for the fallbacks value it should render multiple properties for the same property name

Describe the bug: The array of fallbacks are being render like this:

.Component-withFallbacks-2-2-1 {
  0: [;
  1: o;
  2: b;
  3: j;
  ...
  29: c;
  30: t;
  31: ];
  display: flex;
}

The jss vendor prefix plugin seems to be changing it into the string "[object Object], [object Object]"

Codesandbox link: https://codesandbox.io/s/jss-fallbacks-problem-gbvkf

Versions (please complete the following information):

kof commented 5 years ago

I confirm, something in react-jss or in plugins breaks this, core works as expcted.

kof commented 5 years ago

Also it turns out to be a regression compared to v8

kof commented 5 years ago

Turns out we forgot to handle fallbacks in jss-plugin-vendor-prefixer after we decided to kick them out of vendor-prefixer as a jss specific syntax.

Now I wonder if fallbacks should be prefixed at all or left as-is.

kof commented 5 years ago

Made fallbacks to get prefixed.