cssinjs / jss

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

`gridGap: number` not appending `px` to css rule #883

Closed amwill04 closed 5 years ago

amwill04 commented 5 years ago

Expected behavior: Using number on gridGap should produce the the css rule with px

style = {
    gridGap: 15
}

// Should render the following:
/*
.style {
    grid-gap: 15px
}
*/

// Actually renders the following:
/*
.style {
    grid-gap: 15
}
*/

Describe the bug: It is not appending the px onto the css rule meaning that the rule is ignored.

kof commented 5 years ago

Default unit doesn't know yet about grid-gap, this can be fixed in https://github.com/cssinjs/jss/issues/687

kof commented 5 years ago

as a workaround you can define gridGap: '15px'

HenriBeck commented 5 years ago

893