Slider Knob Width Issue in MainUI

Hello Community,

I’m currently working on a widget in MainUI and noticed that the knob of the slider element is not spanning the full width of the track as expected — like shown in the attached picture.

Even when the slider value is at 100%, the knob is still slightly smaller and doesn’t fully align with the end of the track.

Is this the intended behavior or is there a way to make the knob 100% width?

Here is my code

uid: Cell_huenew
tags:
  - final
props:
  parameters:
    - description: Small header on top of the card
      label: header
      name: header
      required: false
      type: TEXT
      groupName: header
    - context: item
      description: Select the switch group item (e.g., Light_Power)
      label: Switch Group Item
      name: SwitchGroupItem
      required: false
      type: TEXT
      groupName: lightgroup
    - context: item
      description: Select the Color group item (e.g., Light_Color)
      label: Color Group Item
      name: ColorGroupItem
      required: false
      type: TEXT
      groupName: lightgroup
    - context: item
      description: Select the Brightness group item (e.g., Light_Brightness)
      label: Brightness Group Item
      name: BrightnessGroupItem
      required: false
      type: TEXT
      groupName: lightgroup
    - context: item
      description: Select the Color temperature group item (e.g., Light_Color)
      label: Color temperature Group Item
      name: ColorTemperatureGroupItem
      required: false
      type: TEXT
      groupName: lightgroup
    - context: item
      description: Select the scene group item (e.g., Light_Power)
      label: Scene Group Item
      name: SceneGroupItem
      required: false
      type: TEXT
      groupName: lightgroup
    - description: Select the scene1 description group item (e.g., Light_Power)
      label: Scene1 Description
      name: Scene1Description
      required: false
      type: TEXT
      groupName: lightgroup
    - description: Select the scene1 value item (e.g., Light_Power)
      label: Scene1 Value
      name: Scene1Value
      required: false
      type: TEXT
      groupName: lightgroup
    - description: Select the scene2 description group item (e.g., Light_Power)
      label: Scene2 Description
      name: Scene2Description
      required: false
      type: TEXT
      groupName: lightgroup
    - description: Select the scene1 description group item (e.g., Light_Power)
      label: Scene2 value
      name: Scene2Value
      required: false
      type: TEXT
      groupName: lightgroup
    - context: item
      description: Select the switch LightOne item (e.g., Light_Power)
      label: Switch LightOne Item
      name: SwitchLightOneItem
      required: false
      type: TEXT
      groupName: lightone
    - context: item
      description: Select the Color LightOne item (e.g., Light_Color)
      label: Color LightOne Item
      name: ColorLightOneItem
      required: false
      type: TEXT
      groupName: lightone
    - context: item
      description: Select the Brightness LightOne item (e.g., Light_Brightness)
      label: Brightness LightOne Item
      name: BrightnessLightOneItem
      required: false
      type: TEXT
      groupName: lightone
    - context: item
      description: Select the Color temperature LightOne item (e.g., Light_Color)
      label: Color temperature Light One Item
      name: ColorTemperatureLightOneItem
      required: false
      type: TEXT
      groupName: lightone
    - context: item
      description: Select the scene LightOne item (e.g., Light_Power)
      label: Scene LightOne Item
      name: SceneLightOneItem
      required: false
      type: TEXT
      groupName: lightone
    - context: item
      description: Select the switch Light Two item (e.g., Light_Power)
      label: Switch LightTwo Item
      name: SwitchLightTwoItem
      required: false
      type: TEXT
      groupName: lighttwo
    - context: item
      description: Select the Color Light two item (e.g., Light_Color)
      label: Color LightTwo Item
      name: ColorLightTwoItem
      required: false
      type: TEXT
      groupName: lighttwo
    - context: item
      description: Select the Brightness Light two item (e.g., Light_Brightness)
      label: Brightness LightTwo Item
      name: BrightnessLightTwoItem
      required: false
      type: TEXT
      groupName: lighttwo
    - context: item
      description: Select the Color temperature LightTwo item (e.g., Light_Color)
      label: Color temperature Light Two Item
      name: ColorTemperatureLightTwoItem
      required: false
      type: TEXT
      groupName: lighttwo
    - context: item
      description: Select the scene LightTwo item (e.g., Light_Power)
      label: Scene LightTwo Item
      name: SceneLightTwoItem
      required: false
      type: TEXT
      groupName: lighttwo
    - context: item
      description: Select the switch Light three item (e.g., Light_Power)
      label: Switch LightThree Item
      name: SwitchLightThreeItem
      required: false
      type: TEXT
      groupName: lightthree
    - description: Select the Color Light three item (e.g., Light_Color)
      label: Color LightThree Item
      name: ColorLightThreeItem
      required: false
      type: TEXT
      groupName: lightthree
    - context: item
      description: Select the Brightness Light three item (e.g., Light_Brightness)
      label: Brightness LightThree Item
      name: BrightnessLightThreeItem
      required: false
      type: TEXT
      groupName: lightthree
    - context: item
      description: Select the Color temperature Light three item (e.g., Light_Color)
      label: Color temperature Light three Item
      name: ColorTemperatureLightThreeItem
      required: false
      type: TEXT
      groupName: lightthree
    - context: item
      description: Select the scene LightThree item (e.g., Light_Power)
      label: Scene LightThree Item
      name: SceneLightThreeItem
      required: false
      type: TEXT
      groupName: lightthree
    - context: item
      description: Select the switch LightFour item (e.g., Light_Power)
      label: Switch LightFour Item
      name: SwitchLightFourItem
      required: false
      type: TEXT
      groupName: lightfour
    - description: Select the Color LightFour item (e.g., Light_Color)
      label: Color LightFour Item
      name: ColorLightFourItem
      required: false
      type: TEXT
      groupName: lightfour
    - context: item
      description: Select the Brightness LightFour item (e.g., Light_Brightness)
      label: Brightness LightFour Item
      name: BrightnessLightFourItem
      required: false
      type: TEXT
      groupName: lightfour
    - context: item
      description: Select the Color temperature Lightfour item (e.g., Light_Color)
      label: Color temperature Light four Item
      name: ColorTemperatureLightFourItem
      required: false
      type: TEXT
      groupName: lightfour
    - context: item
      description: Select the scene LightFour item (e.g., Light_Power)
      label: Scene LightFour Item
      name: SceneLightFourItem
      required: false
      type: TEXT
      groupName: lightfour
  parameterGroups:
    - name: header
      label: Header
    - name: lightgroup
      label: Light Group
    - name: lightone
      label: Light one
    - name: lighttwo
      label: Light two
    - name: lightthree
      label: Light three
    - name: lightfour
      label: Light four
timestamp: Jan 1, 2025, 6:10:54 PM
component: div
config:
  stylesheet: |
    .card:not(.card-opened) .card-content {
      width: 100% !important;
    }
slots:
  default:
    - component: oh-context
      config:
        constants:
          widgetID: =Number.parseInt(Math.random()*8912).toString(16).padStart(4, '0')
    - component: f7-card
      config:
        expandable: true
        style:
          --f7-card-expandable-tablet-height: 80vh
          --f7-card-expandable-tablet-width: 39vw
          background-color: "=props.bgcolor ? props.bgcolor : ''"
          border-radius: var(--f7-card-expandable-border-radius)
          box-shadow: 5px 5px 10px 1px rgba(0,0,0,0.1)
          height: 150px
          margin-left: 5px
          margin-right: 5px
          margin-top: 10px
          noShadow: false
          padding: 0px
        swipeToClose: true
      slots:
        default:
          - component: f7-card-content
            config:
              style:
                background-color: white
                height: 100%
                margin: 0 0 0 0
                padding: 0 0 0 0
            slots:
              default:
                - component: f7-row
                  config:
                    class:
                      - align-items-center
                    style:
                      background-color: "#f0f0f0"
                      flex-wrap: nowrap
                      font-size: 18px
                      font-weight: bold
                      height: 20px
                      margin: 0 0 0 0
                      width: 100%
                  slots:
                    default:
                      - component: f7-col
                        config:
                          style:
                            background-color: white
                            text-align: left
                            width: 80%
                        slots:
                          default:
                            - component: Label
                              config:
                                style:
                                  margin-left: 20px
                                text: =props.header
                      - component: f7-col
                        config:
                          style:
                            width: 20%
                        slots:
                          default:
                            - component: oh-button
                              config:
                                class:
                                  - cell-open-button
                                color: black
                                iconF7: expand
                                iconSize: 20px
                                style:
                                  background-color: white
                                  text-align: right
                - component: f7-row
                  config:
                    class:
                      - justify-content-center
                    style:
                      font-size: 16px
                      margin: 0 0 0 0
                      padding: 0 0 0 0
                  slots:
                    default:
                      - component: f7-block
                        config:
                          action: toggle
                          actionCommand: ON
                          actionCommandAlt: OFF
                          actionItem: =props.itemSwitch
                          class:
                            - card-prevent-open
                            - card-content-padding
                          outline: false
                          style:
                            background-color: white
                            height: 130px
                            margin: 0px 0px 0px 0px
                            padding: 0px 0px 0px 0px
                            width: 100%
                        slots:
                          default:
                            - component: f7-row
                              slots:
                                default:
                                  - component: f7-col
                                    config:
                                      style:
                                        background-color: white
                                        height: 100%
                                        width: 80%
                                    slots:
                                      default:
                                        - component: f7-row
                                          config:
                                            style:
                                              background-color: white
                                              height: 30%
                                              width: 42%
                                          slots:
                                            default:
                                              - component: Label
                                                config:
                                                  style:
                                                    font-size: 25px
                                                    font-weight: 600
                                                    height: 20px
                                        - component: f7-row
                                          config:
                                            style:
                                              background-color: white
                                              height: 20%
                                              width: 200%
                                          slots:
                                            default:
                                              - component: oh-link
                                                config:
                                                  action: toggle
                                                  actionCommand: ON
                                                  actionCommandAlt: OFF
                                                  actionItem: =props.SwitchGroupItem
                                                  class:
                                                    - display-inline-block
                                                slots:
                                                  default:
                                                    - component: f7-chip
                                                      config:
                                                        color: "=(items[props.SwitchGroupItem].state === 'ON') ? 'green' : 'red'"
                                                        style:
                                                          left: 20px
                                                        text: "=(items[props.SwitchGroupItem].state === 'ON') ? 'AN' : 'AUS'"
                                        - component: f7-row
                                          config:
                                            style:
                                              background-color: green
                                              height: 30%
                                              width: 100%
                                          slots:
                                            default:
                                              - component: f7-col
                                                config:
                                                  style:
                                                    background-color: white
                                                    flex-wrap: nowrap
                                                    height: 100%
                                                    width: 100%
                                                slots:
                                                  default:
                                                    - component: oh-slider
                                                      config:
                                                        item: =props.BrightnessGroupItem
                                                        label: true
                                                        max: 100
                                                        min: 0
                                                        style:
                                                          --f7-range-bar-border-radius: 8px
                                                          --f7-range-bar-size: 8px
                                                          --f7-range-knob-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3)
                                                          --f7-range-knob-size: 20px
                                                          left: 20px
                                                          width: calc(100% - 40px)
                                                        visible: true
                                        - component: f7-row
                                          config:
                                            style:
                                              background-color: blue
                                              flex-wrap: nowrap
                                              height: 20%
                                              width: 10em
                                          slots:
                                            default:
                                              - component: f7-col
                                                config:
                                                  style:
                                                    background-color: white
                                                    height: 100%
                                                    width: 50%
                                                slots:
                                                  default:
                                                    - component: f7-row
                                                      config:
                                                        style:
                                                          background-color: blue
                                                          flex-wrap: nowrap
                                                          height: 100%
                                                          width: 100%
                                                      slots:
                                                        default:
                                                          - component: f7-col
                                                            config:
                                                              style:
                                                                background-color: white
                                                                height: 100%
                                                                width: 100%
                                                            slots:
                                                              default:
                                                                - component: oh-button
                                                                  config:
                                                                    action: command
                                                                    actionCommand: =props.Scene1Value
                                                                    actionItem: =props.SceneGroupItem
                                                                    style:
                                                                      font-size: 14px
                                                                      font-weight: 600
                                                                      margin-left: 5px
                                                                      overflow: hidden
                                                                      text-overflow: ellipsis
                                                                      white-space: nowrap
                                                                    text: Szene 1
                                                                    visible: true
                                              - component: f7-col
                                                config:
                                                  style:
                                                    background-color: green
                                                    flex-wrap: nowrap
                                                    height: 100%
                                                    margin: 0px 0px 0px 0px
                                                    width: 50%
                                                slots:
                                                  default:
                                                    - component: f7-row
                                                      config:
                                                        style:
                                                          background-color: green
                                                          flex-wrap: nowrap
                                                          height: 100%
                                                          width: 100%
                                                      slots:
                                                        default:
                                                          - component: f7-col
                                                            config:
                                                              style:
                                                                background-color: white
                                                                flex-wrap: nowrap
                                                                height: 100%
                                                                width: 100%
                                                            slots:
                                                              default:
                                                                - component: oh-button
                                                                  config:
                                                                    action: command
                                                                    actionCommand: =props.Scene2Value
                                                                    actionItem: =props.SceneGroupItem
                                                                    style:
                                                                      font-size: 14px
                                                                      font-weight: 600
                                                                      margin-left: 5px
                                                                      overflow: hidden
                                                                      text-overflow: ellipsis
                                                                      white-space: nowrap
                                                                    text: Szene 2
                                                                    visible: true
                                  - component: f7-col
                                    config:
                                      style:
                                        background-color: white
                                        height: 100%
                                        width: 20%
                                    slots:
                                      default:
                                        - component: oh-icon
                                          config:
                                            height: 60%
                                            icon: lightbulb
                                            state: =items[props.itemSwitch].state
                      - component: f7-block
                        config:
                          class:
                            - card-prevent-open
                            - card-content-padding
                          outline: false
                          style:
                            width: 100%
                        slots:
                          default:
                            - component: f7-list
                              config: {}
                              slots:
                                default:
                                  - component: oh-toggle-item
                                    config:
                                      item: =props.SwitchGroupItem
                                      title: Lichtschalter
                                      visible: "=props.SwitchGroupItem ? true : false"
                                  - component: oh-list-item
                                    config:
                                      title: Helligkeit
                                      visible: "=props.BrightnessGroupItem ? true : false"
                                  - component: oh-slider
                                    config:
                                      item: =props.BrightnessGroupItem
                                      label: true
                                      max: 100
                                      min: 0
                                      step: 1
                                      style:
                                        --f7-range-bar-border-radius: 8px
                                        --f7-range-bar-size: 8px
                                        --f7-range-knob-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3)
                                        --f7-range-knob-size: 20px
                                        left: 20px
                                        width: calc(100% - 40px)
                                      visible: "=props.BrightnessGroupItem ? true : false"
                                  - component: oh-list-item
                                    config:
                                      title: Farbtemperatur
                                      visible: "=props.ColorTemperatureGroupItem ? true : false"
                                  - component: oh-slider
                                    config:
                                      label: true
                                      min: 2000
                                      max: 6500
                                      item: =props.ColorTemperatureGroupItem
                                      unit: "K"
                                      step: 1
                                      style:
                                        --f7-range-bar-border-radius: 8px
                                        --f7-range-bar-size: 8px
                                        --f7-range-knob-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3)
                                        --f7-range-knob-size: 20px
                                        left: 20px
                                        width: calc(100% - 40px)
                                  - component: oh-list-item
                                    config:
                                      title: Szenenauswahl
                                      visible: "=props.BrightnessGroupItem ? true : false"
                                  - component: oh-input
                                    config:
                                      style:
                                        background: white
                                        margin-left: 15px
                                        margin-top: 20px
                                        width: auto
                                      type: select
                                      variable: SelectedSceneGroupValue
                                      visible: "=props.SceneGroupItem ? true : false"
                                    slots:
                                      default:
                                        - component: option
                                          config:
                                            value: 1
                                          slots:
                                            default:
                                              - component: Content
                                                config:
                                                  text: Sonnenuntergang Savanne
                                        - component: option
                                          config:
                                            value: 2
                                          slots:
                                            default:
                                              - component: Content
                                                config:
                                                  text: Tropendämmerung
                                  - component: oh-button
                                    config:
                                      action: command
                                      actionCommand: =vars.SelectedSceneGroupValue
                                      actionItem: =props.SceneGroupItem
                                      style:
                                        background: white
                                      text: Szene aktivieren
                                      visible: "=props.SceneGroupItem ? true : false"
                                  - component: oh-list-item
                                    config:
                                      title: Farbauswahl
                                      visible: "=props.ColorGroupItem ? true : false"
                                  - component: oh-colorpicker-item
                                    config:
                                      item: =props.ColorGroupItem
                                      modules: =['hue-slider']
                                      title: Choose Color
                                      visible: "=props.ColorGroupItem ? true : false"
                                  - component: f7-navbar
                                    config:
                                      title: Lampe 1
                                      visible: "=props.SwitchLightOneItem ? true : false"
                                  - component: oh-toggle-item
                                    config:
                                      item: =props.SwitchLightOneItem
                                      title: Lichtschalter
                                      visible: "=props.SwitchLightOneItem ? true : false"
                                  - component: oh-list-item
                                    config:
                                      title: Helligkeit
                                      visible: "=props.BrightnessLightOneItem ? true : false"
                                  - component: oh-slider
                                    config:
                                      item: =props.BrightnessLightOneItem
                                      label: Helligkeit
                                      max: 100
                                      min: 0
                                      step: 1
                                      style:
                                        --f7-range-bar-border-radius: 8px
                                        --f7-range-bar-size: 8px
                                        --f7-range-knob-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3)
                                        --f7-range-knob-size: 20px
                                        left: 20px
                                        width: calc(100% - 40px)
                                      visible: "=props.BrightnessLightOneItem ? true : false"
                                  - component: oh-list-item
                                    config:
                                      title: Farbtemperatur
                                      visible: "=props.ColorTemperatureLightOneItem ? true : false"
                                  - component: oh-slider
                                    config:
                                      label: true
                                      min: 2000
                                      max: 6500
                                      item: =props.ColorTemperatureLightOneItem
                                      unit: "K"
                                      step: 1
                                      style:
                                        --f7-range-bar-border-radius: 8px
                                        --f7-range-bar-size: 8px
                                        --f7-range-knob-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3)
                                        --f7-range-knob-size: 20px
                                        left: 20px
                                        width: calc(100% - 40px)
                                      visible: "=props.ColorTemperatureLightOneItem ? true : false"
                                  - component: oh-list-item
                                    config:
                                      title: Szenenauswahl
                                      visible: "=props.SceneLightOneItem ? true : false"
                                  - component: oh-input
                                    config:
                                      style:
                                        background: white
                                        margin-left: 15px
                                        margin-top: 20px
                                        width: auto
                                      type: select
                                      variable: SelectedSceneLightOneValue
                                      visible: "=props.SceneLightOneItem ? true : false"
                                    slots:
                                      default:
                                        - component: option
                                          config:
                                            value: 1
                                          slots:
                                            default:
                                              - component: Content
                                                config:
                                                  text: Sonnenuntergang Savanne
                                        - component: option
                                          config:
                                            value: 2
                                          slots:
                                            default:
                                              - component: Content
                                                config:
                                                  text: Tropendämmerung
                                  - component: oh-button
                                    config:
                                      action: command
                                      actionCommand: =vars.SelectedSceneLightOneValue
                                      actionItem: =props.SceneLightOneItem
                                      style:
                                        background: white
                                      text: Szene aktivieren
                                      visible: "=props.SceneLightOneItem ? true : false"
                                  - component: oh-list-item
                                    config:
                                      title: Farbauswahl
                                      visible: "=props.ColorLightOneItem ? true : false"
                                  - component: oh-colorpicker-item
                                    config:
                                      item: =props.ColorLightOneItem
                                      modules: =['hue-slider']
                                      title: Choose Color
                                      visible: "=props.ColorLightOneItem ? true : false"
                                  - component: f7-navbar
                                    config:
                                      title: Lampe 2
                                      visible: "=props.SwitchLightTwoItem ? true : false"
                                  - component: oh-toggle-item
                                    config:
                                      item: =props.SwitchLightTwoItem
                                      title: Lichtschalter
                                      visible: "=props.SwitchLightTwoItem ? true : false"
                                  - component: oh-list-item
                                    config:
                                      title: Helligkeit
                                      visible: "=props.BrightnessLightTwoItem ? true : false"
                                  - component: oh-slider
                                    config:
                                      item: =props.BrightnessLightTwoItem
                                      label: Helligkeit
                                      max: 100
                                      min: 0
                                      step: 1
                                      style:
                                        --f7-range-bar-border-radius: 8px
                                        --f7-range-bar-size: 8px
                                        --f7-range-knob-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3)
                                        --f7-range-knob-size: 20px
                                        left: 20px
                                        width: calc(100% - 40px)
                                      visible: "=props.BrightnessLightTwoItem ? true : false"
                                  - component: oh-list-item
                                    config:
                                      title: Farbtemperatur
                                      visible: "=props.ColorTemperatureLightTwoItem ? true : false"
                                  - component: oh-slider
                                    config:
                                      label: true
                                      min: 2000
                                      max: 6500
                                      item: =props.ColorTemperatureLightTwoItem
                                      unit: "K"
                                      step: 1
                                      style:
                                        --f7-range-bar-border-radius: 8px
                                        --f7-range-bar-size: 8px
                                        --f7-range-knob-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3)
                                        --f7-range-knob-size: 20px
                                        left: 20px
                                        width: calc(100% - 40px)
                                      visible: "=props.ColorTemperatureLightTwoItem ? true : false"
                                  - component: oh-list-item
                                    config:
                                      title: Szenenauswahl
                                      visible: "=props.BrightnessLightTwoItem ? true : false"
                                  - component: oh-input
                                    config:
                                      style:
                                        background: white
                                        margin-left: 15px
                                        margin-top: 20px
                                        width: auto
                                      type: select
                                      variable: SelectedSceneLightTwoValue
                                      visible: "=props.SceneLightTwoItem ? true : false"
                                    slots:
                                      default:
                                        - component: option
                                          config:
                                            value: 1
                                          slots:
                                            default:
                                              - component: Content
                                                config:
                                                  text: Sonnenuntergang Savanne
                                        - component: option
                                          config:
                                            value: 2
                                          slots:
                                            default:
                                              - component: Content
                                                config:
                                                  text: Tropendämmerung
                                  - component: oh-button
                                    config:
                                      action: command
                                      actionCommand: =vars.SelectedSceneLightTwoValue
                                      actionItem: =props.SceneLightTwoItem
                                      style:
                                        background: white
                                      text: Szene aktivieren
                                      visible: "=props.SceneLightTwoItem ? true : false"
                                  - component: oh-list-item
                                    config:
                                      title: Farbauswahl
                                      visible: "=props.ColorLightTwoItem ? true : false"
                                  - component: oh-colorpicker-item
                                    config:
                                      item: =props.ColorLightTwoItem
                                      modules: =['hue-slider']
                                      title: Choose Color
                                      visible: "=props.ColorLightTwoItem ? true : false"
                                  - component: f7-navbar
                                    config:
                                      title: Lampe 3
                                      visible: "=props.SwitchLightThreeItem ? true : false"
                                  - component: oh-toggle-item
                                    config:
                                      item: =props.SwitchLightThreeItem
                                      title: Lichtschalter
                                      visible: "=props.SwitchLightThreeItem ? true : false"
                                  - component: oh-list-item
                                    config:
                                      title: Helligkeit
                                      visible: "=props.BrightnessLightThreeItem ? true : false"
                                  - component: oh-slider
                                    config:
                                      item: =props.BrightnessLightThreeItem
                                      label: Helligkeit
                                      max: 100
                                      min: 0
                                      step: 1
                                      style:
                                        --f7-range-bar-border-radius: 8px
                                        --f7-range-bar-size: 8px
                                        --f7-range-knob-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3)
                                        --f7-range-knob-size: 20px
                                        left: 20px
                                        width: calc(100% - 40px)
                                      visible: "=props.BrightnessLightThreeItem ? true : false"
                                  - component: oh-list-item
                                    config:
                                      title: Farbtemperatur
                                      visible: "=props.ColorTemperatureLightThreeItem ? true : false"
                                  - component: oh-slider
                                    config:
                                      label: true
                                      min: 2000
                                      max: 6500
                                      item: =props.ColorTemperatureLightThreeItem
                                      unit: "K"
                                      step: 1
                                      style:
                                        --f7-range-bar-border-radius: 8px
                                        --f7-range-bar-size: 8px
                                        --f7-range-knob-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3)
                                        --f7-range-knob-size: 20px
                                        left: 20px
                                        width: calc(100% - 40px)
                                      visible: "=props.ColorTemperatureLightThreeItem ? true : false"
                                  - component: oh-list-item
                                    config:
                                      title: Szenenauswahl
                                      visible: "=props.BrightnessLightThreeItem ? true : false"
                                  - component: oh-input
                                    config:
                                      style:
                                        background: white
                                        margin-left: 15px
                                        margin-top: 20px
                                        width: auto
                                      type: select
                                      variable: SelectedSceneLightThreeValue
                                      visible: "=props.SceneLightThreeItem ? true : false"
                                    slots:
                                      default:
                                        - component: option
                                          config:
                                            value: 1
                                          slots:
                                            default:
                                              - component: Content
                                                config:
                                                  text: Sonnenuntergang Savanne
                                        - component: option
                                          config:
                                            value: 2
                                          slots:
                                            default:
                                              - component: Content
                                                config:
                                                  text: Tropendämmerung
                                  - component: oh-button
                                    config:
                                      action: command
                                      actionCommand: =vars.SelectedSceneLightThreeValue
                                      actionItem: =props.SceneLightThreeItem
                                      style:
                                        background: white
                                      text: Szene aktivieren
                                      visible: "=props.SceneLightThreeItem ? true : false"
                                  - component: oh-list-item
                                    config:
                                      title: Farbauswahl
                                      visible: "=props.ColorLightThreeItem ? true : false"
                                  - component: oh-colorpicker-item
                                    config:
                                      item: =props.ColorLightThreeItem
                                      modules: =['hue-slider']
                                      title: Choose Color
                                      visible: "=props.ColorLightThreeItem ? true : false"
                                  - component: f7-navbar
                                    config:
                                      title: Lampe 4
                                      visible: "=props.SwitchLightFourItem ? true : false"
                                  - component: oh-toggle-item
                                    config:
                                      item: =props.SwitchLightFourItem
                                      title: Lichtschalter
                                      visible: "=props.SwitchLightFourItem ? true : false"
                                  - component: oh-list-item
                                    config:
                                      title: Helligkeit
                                      visible: "=props.BrightnessLightFourItem ? true : false"
                                  - component: oh-slider
                                    config:
                                      item: =props.BrightnessLightFourItem
                                      label: Helligkeit
                                      max: 100
                                      min: 0
                                      step: 1
                                      style:
                                        --f7-range-bar-border-radius: 8px
                                        --f7-range-bar-size: 8px
                                        --f7-range-knob-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3)
                                        --f7-range-knob-size: 20px
                                        left: 20px
                                        width: calc(100% - 40px)
                                      visible: "=props.BrightnessLightFourItem ? true : false"
                                  - component: oh-list-item
                                    config:
                                      title: Farbtemperatur
                                      visible: "=props.ColorTemperatureLightFourItem ? true : false"
                                  - component: oh-slider
                                    config:
                                      label: true
                                      min: 2000
                                      max: 6500
                                      item: =props.ColorTemperatureLightFourItem
                                      unit: "K"
                                      step: 1
                                      style:
                                        --f7-range-bar-border-radius: 8px
                                        --f7-range-bar-size: 8px
                                        --f7-range-knob-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3)
                                        --f7-range-knob-size: 20px
                                        left: 20px
                                        width: calc(100% - 40px)
                                      visible: "=props.ColorTemperatureLightFourItem ? true : false"
                                  - component: oh-list-item
                                    config:
                                      title: Szenenauswahl
                                      visible: "=props.BrightnessLightFourItem ? true : false"
                                  - component: oh-input
                                    config:
                                      style:
                                        background: white
                                        margin-left: 15px
                                        margin-top: 20px
                                        width: auto
                                      type: select
                                      variable: SelectedSceneLightFourValue
                                      visible: "=props.SceneLightFourItem ? true : false"
                                    slots:
                                      default:
                                        - component: option
                                          config:
                                            value: 1
                                          slots:
                                            default:
                                              - component: Content
                                                config:
                                                  text: Sonnenuntergang Savanne
                                        - component: option
                                          config:
                                            value: 2
                                          slots:
                                            default:
                                              - component: Content
                                                config:
                                                  text: Tropendämmerung
                                  - component: oh-button
                                    config:
                                      action: command
                                      actionCommand: =vars.SelectedSceneLightFourValue
                                      actionItem: =props.SceneLightFourItem
                                      style:
                                        background: white
                                      text: Szene aktivieren
                                      visible: "=props.SceneLightFourItem ? true : false"
                                  - component: oh-list-item
                                    config:
                                      title: Farbauswahl
                                      visible: "=props.ColorLightFourItem ? true : false"
                                  - component: oh-colorpicker-item
                                    config:
                                      item: =props.ColorLightFourItem
                                      modules: =['hue-slider']
                                      title: Choose Color
                                      visible: "=props.ColorLightFourItem ? true : false"
                            - component: oh-button
                              config:
                                class:
                                  - card-opened-fade-in
                                  - cell-close-button
                                  - card-close
                                color: black
                                iconF7: xmark_circle_fill
                                iconSize: 30px
                                style:
                                  top: 20px

I’ve tried adjusting the layout and CSS properties, but I couldn’t get it to fit perfectly.

Any advice or pointers would be highly appreciated!

Thank you!

Just looking at your yaml, I don’t see any problem, and, in fact, when I test your code the slider works properly (initially).

The slider is built out of several parts by the f7 library. In order for all the pieces to line up, the library calculates the size of the elements when they are drawn. Unfortunately, the f7 library is not perfect at detecting changes to the size of those elements in response to some events. This means that is it not uncommon for the slider elements to get out of sync like this if the container they are in changes size.

So, I can replicate the issue you are seeing only by loading up the widget and then changing the size of the card (e.g., by moving the divider in the widget editor). But, just using the editor’s redraw function fixes the issue.

In most use cases you won’t see this problem because once rendered on a page, the base card will not be changing in size without also being fully redrawn.

I see it everytime when I open the widget


Well, I stand corrected.

Do you still have the same problem if you remove the stylesheet from the root div of the widget? I know that changes the overall positioning, but is the slider at least internally consistent all the time?

I don’t have the issue with the knob but than i have the issue with my widget if it’s opened in a popup. “wohnen” widget is the width to big

this is my overview page

config:
  label: Overview
  sidebar: true
blocks:
  - component: oh-block
    config: {}
    slots:
      default:
        - component: oh-grid-row
          config: {}
          slots:
            default:
              - component: oh-grid-col
                config:
                  large: "20"
                  medium: "33"
                  width: "50"
                  xlarge: "20"
                slots:
                  default:
                    - component: widget:Cell_Card_Dayphase
              - component: oh-grid-col
                config:
                  large: "20"
                  medium: "33"
                  width: "50"
                  xlarge: "20"
                slots:
                  default:
                    - component: widget:Cell_Card_Activity_BackgroundImage
                      config:
                        ImgSourceURL: /static/images/lg-oled55b39la.png
                        checkitem: Status_WohnzimmerActivity
                        checkvalue: Film
                        commandOff: PowerOff
                        commandOn: Film
                        controlitem: Status_WohnzimmerActivity
                        header: TV Wohnzimmer
                        title: Aktiv
              - component: oh-grid-col
                config:
                  large: "20"
                  medium: "33"
                  width: "50"
                  xlarge: "20"
                slots:
                  default:
                    - component: widget:Cell_Card_Activity_BackgroundImage
                      config:
                        ImgSourceURL: /static/images/lg-oled55b39la.png
                        checkitem: Status_WohnzimmerActivity
                        checkvalue: Radio
                        commandOff: PowerOff
                        commandOn: Radio
                        controlitem: Status_WohnzimmerActivity
                        header: Radio Wohnzimmer
                        title: Aktiv
              - component: oh-grid-col
                config:
                  large: "20"
                  medium: "33"
                  width: "50"
                  xlarge: "20"
                slots:
                  default:
                    - component: widget:Cell_Card_Activity_BackgroundColor
                      config:
                        BackgrounColorOff: rgba(231, 111, 81, 0.5)
                        BackgrounColorOn: rgba(52, 235, 113, 0.5)
                        checkitem: Switch_House_SmartHomeMaster
                        checkvalue: ON
                        commandOff: OFF
                        commandOn: ON
                        controlitem: Switch_House_SmartHomeMaster
                        header: Hauptschalter
                        icon: zzz
              - component: oh-grid-col
                config:
                  large: "20"
                  medium: "33"
                  width: "50"
                  xlarge: "20"
                slots:
                  default:
                    - component: widget:Card_room_12
                      config:
                        alarm: Sensor_House_SmartHomeOperatingSpecialMode
                        alarmcheckvalue: "2"
                        alarmcheckvalueone: "1"
                        alarmcheckvaluetwo: "0"
                        command: "5"
                        header: Alles aus
                        icon: alarm
                        iconimage: alarmclock
                        item: Szene
                        page: page_alarm
                        text_header: Alarm
                        title: Hauptschalter
  - component: oh-block
    config: {}
    slots:
      default:
        - component: oh-grid-row
          config: {}
          slots:
            default:
              - component: oh-grid-col
                config:
                  large: "40"
                  medium: "40"
                  small: "100"
                  width: "100"
                  xlarge: "40"
                  xsmall: "100"
                slots:
                  default:
                    - component: widget:Cell_Weather_1
                      config:
                        command: "5"
                        header: Alles aus
                        icon: zzz
                        item: Szene
                        title: Wetter
              - component: oh-grid-col
                config:
                  large: "30"
                  medium: "30"
                  small: "100"
                  width: "100"
                  xlarge: "30"
                  xsmall: "100"
                slots:
                  default:
                    - component: widget:Cell_Weather_Actual_1
                      config:
                        item_hum: Humidity_Outdoor_WeatherFlowTempestHumidity
                        item_ill: Illuminance_Outdoor_WeatherFlowTempestIlluminance
                        item_rain: Sensor_Outdoor_WeatherFlowTempestRainAccumulated
                        item_strike: Sensor_Outdoor_WeatherFlowTempestStrikeCount
                        item_temp: Temperature_Outdoor_WeatherFlowTempestTemperature
                        item_wind: Speed_Outdoor_WeatherFlowTempestWindAvgSpeed
                        item_wind_dir: Angle_Outdoor_WeatherFlowTempestWindDirection
                        page: page_wetterchart
                        title: Aussen
              - component: oh-grid-col
                config:
                  large: "10"
                  medium: "10"
                  small: "50"
                  width: "50"
                  xlarge: "10"
                  xsmall: "50"
                slots:
                  default:
                    - component: widget:Cell_Garden_1
                      config:
                        item_soil_hum: Moisture_Garden_MiFlora1
                        item_zone: WateringAutomatic_CurrentZone
                        title: Garten
              - component: oh-grid-col
                config:
                  large: "10"
                  medium: "10"
                  small: "50"
                  width: "50"
                  xlarge: "10"
                  xsmall: "50"
                slots:
                  default:
                    - component: widget:Cell_Settings_1
                      config:
                        BatteryValueThreshold: "20"
                        ItemGroupBattery: Group_House_SensorBattery
                        Page: page_Einstellungen
  - component: oh-block
    config: {}
    slots:
      default:
        - component: oh-grid-row
          config: {}
          slots:
            default:
              - component: oh-grid-col
                config:
                  large: "25"
                  medium: "33"
                  small: "50"
                  width: "100"
                  xlarge: "25"
                slots:
                  default:
                    - component: widget:Card_room_12
                      config:
                        door_lock: Group_GF_Livingroom_Door
                        door_state: Group_GF_Livingroom_Door
                        iconimage: livingroom
                        page: page_39b7fc705d
                        status: Group_GF_Livingroom_SwitchLight
                        text_header: Wohnzimmer
              - component: oh-grid-col
                config:
                  large: "25"
                  medium: "33"
                  small: "50"
                  width: "100"
                  xlarge: "25"
                slots:
                  default:
                    - component: widget:Card_room_12
                      config:
                        page: ZimmerEltern
                        text_header: Eltern
              - component: oh-grid-col
                config:
                  large: "25"
                  medium: "33"
                  small: "50"
                  width: "100"
                  xlarge: "25"
                slots:
                  default:
                    - component: widget:Card_room_12
                      config:
                        page: ZimmerKind
                        text_header: Kind
              - component: oh-grid-col
                config:
                  large: "25"
                  medium: "33"
                  small: "50"
                  width: "100"
                  xlarge: "25"
                slots:
                  default:
                    - component: widget:Card_room_12
                      config:
                        iconimage: myfrontdoor
                        page: page_c498bc9132
                        text_header: Eingangsbereich
              - component: oh-grid-col
                config:
                  large: "25"
                  medium: "33"
                  small: "50"
                  width: "100"
                  xlarge: "25"
                slots:
                  default:
                    - component: widget:Card_room_12
                      config:
                        iconimage: bathroom
                        page: page_b986cb7442
                        text_header: Bad/WC
              - component: oh-grid-col
                config:
                  large: "25"
                  medium: "33"
                  small: "50"
                  width: "100"
                  xlarge: "25"
                slots:
                  default:
                    - component: widget:Card_room_12
                      config:
                        page: ZimmerHobby
                        text_header: Hobbyraum / Keller
              - component: oh-grid-col
                config:
                  large: "25"
                  medium: "33"
                  small: "50"
                  width: "100"
                  xlarge: "25"
                slots:
                  default:
                    - component: widget:Card_room_12
                      config:
                        page: page_9a9ffe53b4
                        text_header: Gaeste WC
              - component: oh-grid-col
                config:
                  large: "25"
                  medium: "33"
                  small: "50"
                  width: "100"
                  xlarge: "25"
                slots:
                  default:
                    - component: widget:Card_room_12
                      config:
                        page: page_9a9ffe53b4
                        text_header: Gaeste WC
  - component: oh-block
  - component: oh-block
    config: {}
    slots:
      default:
        - component: oh-grid-row
          config: {}
          slots:
            default:
              - component: oh-grid-col
                config:
                  large: "25"
                  medium: "33"
                  small: "50"
                  width: "100"
                  xlarge: "25"
                slots:
                  default:
                    - component: widget:PV_widget
                      config:
                        gesamtproduktion: Energy_House_DeyeYearlyTotalEnergy
                        gesamtverbrauch: Power_House_ActualPowerOverall
                        monatsproduktion: Energy_House_DeyeMonthlyTotalEnergy
                        netzeinspeisung: Power_House_ActualPowerOverall
                        pv_leistung: Power_House_DeyeActualPower
                        strombezug: Energy_House_TotalEnergyYearly
                        tagesproduktion: Energy_House_DeyeDailyTotalEnergy
masonry: []
grid: []
canvas: []

and if you klick on “Wohnzimmer” the popup is shown but the widget is the width to much it should look like

but it looks like this

that was this issue

Right, the card issue was expected. This was just an experiment to see if, as I suspected, the stylesheet was causing the issue with the slider, and it appears that’s true.

What I think is going on is that because of the way the widgets apply the stylesheet, the slider width is is calculated by the f7 library and the slider is created, then the stylesheet gets applied and the card gets resized. As I said up above, when a change to the size of the slider’s container doesn’t cause a recalculation of the slider size itself, you get this issue (because the knob position relative to the slider bar is set by a fixed pixel size, not a percentage).

Alas, I’m not sure there’s an easy solution here because you have run up against a limitation of the f7 library and have a significant number of restrictive requirements which make working around that limitation difficult. If this were me it would be time to start over with a significant refactor of the widget and, because I don’t have control over that f7 library issue, the refactoring would start with looking at those self-imposed requirements to see which could be adjusted/withdrawn to allow more freedom in the widget design.

How can I rework it with a better code?? sorry that’s way beyond my skills

Basically, I mean rethink the structure. For example, right now you are trying to have the card expand to show additional settings (this is, in fact, the source of much of the complexity here as far as I can tell), but there are many other options for that which would probably make the construction much simpler such as moving the secondary information to a popup or sheet instead of the expanding card. Or maybe, because the slider is already on the main card, you don’t need to also have it on the expanded card which means that you could rework the css so that you don’t need stylesheet.

Right now the full combination of design decisions have taken you to this point where getting it to work fully is going to be laborious if it’s even possible at all. So re-examine those decisions and see which ones you feel you must keep and which ones you could be flexible on.