strip: spacing: add support for percents (#215)
This commit is contained in:
parent
a89f3a5bdc
commit
e2a70f507a
4 changed files with 16 additions and 7 deletions
|
|
@ -46,7 +46,11 @@ module.exports = class Strip extends Panel {
|
|||
|
||||
super(options)
|
||||
|
||||
this.widget.style.setProperty('--spacing', this.getProp('spacing'))
|
||||
if (this.getProp('spacing')) {
|
||||
var spacing = this.getProp('spacing')
|
||||
if (!isNaN(spacing)) spacing += 'rem'
|
||||
this.widget.style.setProperty('--spacing', spacing)
|
||||
}
|
||||
|
||||
this.container.classList.add(this.getProp('horizontal') ? 'horizontal' : 'vertical')
|
||||
if (this.getProp('stretch')) this.container.classList.add('stretch')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue