cssinjs/jss

Dynamic styles and vendor prefixes not working as expected

オープン

#1,409 opened on 2020/10/16

 (0 件のコメント) (0 件のリアクション) (0 人の担当者)JavaScript (434 件のフォーク)batch import
bughelp wanted

Repository metrics

Stars
 (7,000 個のスター)
PR merge metrics
 (PR metrics pending)

説明

Expected behavior: I have a dynamic style that read a prop and return its value, I think that the vendor prefixes plugin is not working well in this case.

Describe the bug: I tried to generate the a css class with lineClamp key inside it, I expected that this is transformed to 'webkit-line-clamp'. This works well if I use a static style, but it doesn't if it is a dynamic one.

If I change the order in which the plugins are created and move 'jss-plugin-vendor-prefixer' to the first element, it seems to work.

Codesandbox link: https://codesandbox.io/s/lucid-sutherland-7l2ry?file=/src/App.js

Versions (please complete the following information):

  • jss: 10.4
  • Browser [e.g. chrome, safari]: Chrome
  • OS [e.g. Windows, macOS]: macOS/Linux

コントリビューターガイド