[jss-default-unit] Unit is inflexible.
default-unit assigns px as the default unit for animation-duration (should be ms):
exampleClass: {
animationDuration: 100
}
Becomes:
.exampleClass--jss-0-34 {
animation-duration: 100px;
}
I looked over the source and tests. The plugin accepts an object parameter specifying which unit will serve as the default unit, and that unit is used for everything. If we pass {unit: 'ms'}, it would fix the case given above, but would also cause this: height: 100 -> height: 100ms.
N.b.: I will make a PR later today, offering more flexibility and choice among default units.
It's a bug, we are missing this property in this list https://github.com/jsstyles/jss-default-unit/blob/master/src/numericProps.js
Initial idea was to just have one default unit, because everything else is a very rare use case ....
If we start maintaining different defaults for sizes and times etc the list might become pretty big. Not sure it's worth it.
Lets fix the bug for now, we can open an enhancement issue for multiple defaults. I want to see lots of people voting for this enhancement before we add it.
Will add this prop in a bit to the list.
released
Just opened an issue (looking for an enhancement label, as you suggested): https://github.com/jsstyles/jss/issues/272