This seems to be a oh-cell specific problem / bug.
The slider component (and maybe other components?!) sets its width depending on the number of visible cell components in the row they resides in (asuming that each of the components will take up the same amount of the page-width - which would work in the row / column layout).
So if e.g. 2 cells are in one row the slider will take up 50% of the avilable width of that page (even if only parts of it are filled with cells because of their fixed width) - This is also the reason why it works fine if you fill the remaining row-space with cells.
Theres no quick solution for that problem besides fixing the component itself, I assume.
I would recommend you using the row / column grid instead for now, in which it would work just fine.
tried another approach using the background slot instead:
uid: Cell_Light_Card_1
tags: []
props:
parameters:
- description: Small title on top of the card
label: Title
name: title
required: false
type: TEXT
- description: Header big sized
label: Header
name: header
required: false
type: TEXT
- description: Icon on top of the card (only f7 icons (without f7:))
label: Icon
name: icon
required: false
type: TEXT
- label: Background Color
name: bgcolor
required: false
type: TEXT
- context: item
description: Item to control on/off
label: Item
name: item_schalter
required: false
type: TEXT
- context: item
description: Item to control brightness
label: Item
name: item_brightness
required: false
type: TEXT
parameterGroups: []
timestamp: Mar 22, 2021, 7:27:35 PM
component: oh-cell
config:
style:
noShadow: false
padding: 0px
border-radius: var(--f7-card-expandable-border-radius)
box-shadow: 5px 5px 10px 1px rgba(0,0,0,0.1)
background-color: "=props.bgcolor ? props.bgcolor : ''"
height: 120px
margin-left: 5px
margin-right: 5px
slots:
background:
- component: f7-block
config:
style:
flex-direction: row
slots:
default:
- component: Label
config:
text: "=props.header ? props.header : 'Set Props'"
style:
font-size: 17px
font-weight: 600
margin-left: 0px
margin-top: 0px
- component: oh-slider
config:
item: =props.item_brightness
min: 0
max: 100
style:
margin: 2rem
width: calc(100% - 4rem)
--f7-range-bar-size: 8px
--f7-range-bar-border-radius: 8px
--f7-range-knob-size: 20px
--f7-range-knob-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3)
- component: oh-toggle
config:
item: =props.item_schalter
style:
position: absolute
top: 15px
right: 20px
It mostly works, but not initially - if you resize the page width even by 1 pixel though, the actual size gets recomputed and it’s back in order. We’re all experimenting I guess