Hi!
First things first:
the new UI is amazing and I love the possibilities we get with it.
I´ve spent quite some time learning and trial and error to get my custom widget looking ok.
But now I´m stuck - I´ve spent some hours now on this problem:
I can´t understand why oh-masonry and oh-grid-col mess up the width of my custom widget.
If I just place the widget into the page, everything is fine:
but as soon as there are more columns or in the oh-masonry with more widgets, I get this:
If I reduce the width of the window even more the masonry then moves one widget to the next row:
I´ve set the min-width but it seems to get ignored.
I´m an absolute rookie with CSS, quite frustrated already and I´m really glad on any hints and suggestions for improvements of my widget.
thanks!
uid: shutter-lamella
tags: []
props:
parameters:
- description: The title of the Shutter Lamella
label: Title
name: title
required: false
type: TEXT
- context: item
description: the shutteritem
label: Item
name: itemShutter
required: true
type: TEXT
- context: item
description: the Lamellaitem
label: Lamellaitem
name: lamella
required: true
type: TEXT
parameterGroups: []
timestamp: Feb 22, 2021, 11:31:48 AM
component: f7-card
config:
title: =props.title
style:
border-radius: 12px
min-width: 279px
max-width: 400px
slots:
default:
- component: f7-row
config:
padding: 0px
margin: 0px
noGap: true
style:
height: 128px
min-width: 279px
slots:
default:
- component: f7-col
config:
style:
width: 33px
position: relative
left: +7px
top: +3px
justify-content: center
slots:
default:
- component: f7-row
config:
padding: 0px
margin: 0px
style:
justify-content: center
slots:
default:
- component: f7-icon
config:
f7: arrowtriangle_up
size: 42
color: gray
slots:
default:
- component: oh-button
config:
action: command
actionItem: =props.itemShutter
actionCommand: UP
style:
position: absolute
top: 0px
width: 100%
height: 100%
- component: f7-row
config:
class:
- justify-content-center
slots:
default:
- component: f7-icon
config:
f7: stop
size: 42
color: red
slots:
default:
- component: oh-button
config:
action: command
actionItem: =props.itemShutter
actionCommand: STOP
style:
position: absolute
top: 0px
width: 100%
height: 100%
- component: f7-row
config:
class:
- justify-content-center
slots:
default:
- component: f7-icon
config:
f7: arrowtriangle_down
size: 42
color: gray
slots:
default:
- component: oh-button
config:
action: command
actionItem: =props.itemShutter
actionCommand: DOWN
style:
position: absolute
top: 0px
width: 100%
height: 100%
- component: f7-col
config:
style:
width: 130px
height: 130px
position: absolute
left: 45px
#top: calc(top + 3px)
padding: 0px
margin: 0px
class:
- justify-content-center
slots:
default:
- component: oh-knob
config:
item: =props.itemShutter
primaryColor: rgb(117, 48, 13)
secondaryColor: lightgrey
responsive: true
- component: f7-col
config:
style:
position: absolute
left: 178px
min-width: 100px
width: calc(100% - 178px)
padding: 0px
margin: 0px
class:
- justify-content-center
slots:
default:
- component: f7-row
config:
class:
- button
style:
--f7-button-hover-bg-color: transparent
--f7-button-bg-color: transparent
height: 32px
slots:
default:
- component: f7-col
config:
style:
width: 20px
slots:
default:
- component: oh-icon
config:
icon: lamelle-0
style:
height: 32px
position: absolute
top: +2px
left: 13px
- component: f7-col
config:
width: 100%
slots:
default:
- component: oh-button
config:
raised: false
round: true
outline: true
style:
background: '=(items[props.lamella].state > 2) ? "linear-gradient(180deg, rgba(245, 190, 163, 0.0), rgba(245, 190, 163, 0.25))" : ""'
--f7-button-hover-bg-color: rgba(30, 30, 30, 0.2)
--f7-button-border-color: rgb(120, 120, 120)
position: absolute
top: 0
left: 0
height: 32px
width: 100%
z-index: 1
action: command
actionItem: =props.lamella
actionCommand: = "0"
- component: Label
config:
text: OFFEN
style:
color: black
font-weight: normal
position: absolute
font-size: 13px
top: -1px
right: 10%
z-index: 0
- component: f7-row
slots:
default:
- component: f7-col
config:
style:
width: 20px
slots:
default:
- component: oh-icon
config:
icon: lamelle-10
style:
height: 32px
position: absolute
top: 32px
left: 13px
- component: f7-col
config:
width: 100%
slots:
default:
- component: oh-button
config:
raised: false
round: true
outline: true
style:
background: '=(items[props.lamella].state > 28) ? "linear-gradient(180deg, rgba(245, 190, 163, 0.25), rgba(245, 190, 163, 0.5))" : ""'
--f7-button-hover-bg-color: rgba(30, 30, 30, 0.2)
--f7-button-border-color: rgb(120, 120, 120)
position: absolute
top: 32px
left: 0
height: 32px
width: 100%
z-index: 1
action: command
actionItem: =props.lamella
actionCommand: = "33"
- component: Label
config:
text: HELL
style:
text-align: right
vertical-align: top
color: black
font-weight: normal
font-size: 13px
position: absolute
top: 39px
right: 10%
z-index: 0
- component: f7-row
slots:
default:
- component: f7-col
config:
style:
width: 20px
slots:
default:
- component: oh-icon
config:
icon: lamelle-50
style:
height: 32px
position: absolute
top: 64px
left: 13px
- component: f7-col
config:
width: 100%
slots:
default:
- component: oh-button
config:
raised: false
round: true
outline: true
style:
background: '=(items[props.lamella].state > 60) ? "linear-gradient(180deg, rgba(245, 190, 163, 0.5), rgba(245, 190, 163, 0.75))" : ""'
--f7-button-hover-bg-color: rgba(30, 30, 30, 0.2)
--f7-button-border-color: rgb(120, 120, 120)
position: absolute
top: 64px
left: 0
height: 32px
width: 100%
z-index: 1
action: command
actionItem: =props.lamella
actionCommand: = "66"
- component: Label
config:
text: DUNKEL
style:
text-align: right
vertical-align: top
color: black
font-weight: normal
font-size: 13px
position: absolute
top: 71px
right: 10%
z-index: 0
- component: f7-row
slots:
default:
- component: f7-col
config:
style:
width: 20px
slots:
default:
- component: oh-icon
config:
icon: lamelle-100
style:
height: 32px
position: absolute
top: 96px
left: 13px
- component: f7-col
config:
width: 100%
slots:
default:
- component: oh-button
config:
raised: false
round: true
outline: true
style:
background: '=(items[props.lamella].state > 70) ? "linear-gradient(180deg, rgba(245, 190, 163, 0.75), rgba(245, 190, 163, 1))" : ""'
--f7-button-hover-bg-color: rgba(30, 30, 30, 0.2)
--f7-button-border-color: rgb(120, 120, 120)
position: absolute
top: 96px
left: 0
height: 32px
width: 100%
z-index: 1
action: command
actionItem: =props.lamella
actionCommand: = "100"
- component: Label
config:
text: ZU
style:
text-align: right
vertical-align: top
color: black
font-weight: normal
font-size: 13px
position: absolute
top: 103px
right: 10%
z-index: 0