Skip to content

Commit

Permalink
Fix ignored props in non lean mode
Browse files Browse the repository at this point in the history
  • Loading branch information
porsager committed Apr 15, 2020
1 parent 9eb3ee9 commit fcd3b86
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/create.js
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ export default function bss({
s.slice(x.prop, x.propEnd), s.slice(x.value, i + 1), x
)
)
x.end = i + 1
x.end = i + (x.lean ? 1 : 2)
x.comma = x.value
x.value = x.prop = x.propEnd = null
x.lean = true
Expand Down
9 changes: 9 additions & 0 deletions tests/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,15 @@ t('Multiline property values', () => {
]
})

t('0 value is added correct', () => {
b`w ${ 0 }%`.toString()

return [
cn() + cn() + '{width:0%;}',
b.rules.pop()
]
})

/*
t('Inline comments', () => {
b`position: absolute; // This is absolute
Expand Down

0 comments on commit fcd3b86

Please sign in to comment.