Define size of card expandable

Hello,

I created a widget

uid: Cell_Wallplug
tags: []
props:
  parameters:
    - context: item
      description: A actual power item to display
      label: Item
      name: itemActualPower
      required: false
      type: TEXT
    - context: item
      description: A total power item to display
      label: Item
      name: itemTotalePower
      required: false
      type: TEXT
    - context: item
      description: A daily total power item to display
      label: Item
      name: itemDailyTotalPower
      required: false
      type: TEXT
    - context: item
      description: the switch state
      label: Item
      name: itemSwitch
      required: false
      type: TEXT
    - description: URL to show in the frame
      label: Source URL
      name: URL
      required: true
      type: TEXT
    - default: from=now-6h&to=now;6h,from=now-12h&to=now;12h,from=now-1d&to=now;24h,from=now/d&to=now/d;Day,from=now-3d&to=now;Last
        3 Days,from=now-7d&to=now;Last 7 Days,from=now-14d&to=now;Last 14 Days
      description: Comma-separated List of options. Example
        "from=now-6h&to=now;-6h,from=now-1d/d&to=now-1d/d;yesterday" for past
        "6h" and "yesterday". First entry is default.
      label: Time range options
      name: timerange
      required: true
      type: TEXT
  parameterGroups: []
timestamp: Apr 22, 2024, 8:02:09 AM
component: f7-card
config:
  backdrop: true
  class:
    - card-expandable-animate-width
  expandable: true
  style:
    height: 200px
    --f7-card-expandable-tablet-width: 95%
  swipeToClose: true
slots:
  default:
    - component: oh-button
      config:
        class:
          - cell-open-button
          - card-opened-fade-out
        color: black
        iconF7: expand
        iconSize: 30px
        style:
          padding-bottom: 35px
          padding-top: 10px
          position: absolute
          right: 0
          top: 0
          z-index: 999
    - component: f7-card-content
      config:
        style:
          width: 100%
      slots:
        default:
          - component: oh-icon
            config:
              height: 80px
              icon: poweroutlet
              state: =items[props.itemSwitch].state
              style:
                opacity: 40%
                position: absolute
                right: 16px
                top: 120px
              width: 80px
          - component: oh-button
            config:
              class:
                - card-opened-fade-in
                - cell-close-button
                - card-close
              color: black
              iconF7: xmark_circle_fill
              iconSize: 30px
              style:
                padding-bottom: 35px
                padding-top: 10px
                position: absolute
                right: 0
                top: 0
                z-index: 999
          - component: oh-link
            config:
              action: toggle
              actionCommand: ON
              actionCommandAlt: OFF
              actionItem: =props.itemSwitch
              class:
                - card-prevent-open
              style:
                height: 100%
                left: 0
                position: absolute
                top: 0
                width: 100%
                z-index: 0
          - component: f7-block
            config:
              class:
                - no-padding
              style:
                height: 200px
                margin: 0px
            slots:
              default:
                - component: f7-row
                  config:
                    bgcolor: green
                    style:
                      height: 30px
                  slots:
                    default:
                      - component: Label
                        config:
                          style:
                            font-size: 25px
                            font-weight: 600
                          text: steckdose
                - component: f7-row
                  config:
                    bgcolor: green
                    style:
                      flex-wrap: nowrap
                      height: 80px
                      white-space: nowrap
                  slots:
                    default:
                      - component: f7-col
                        config:
                          width: 30
                        slots:
                          default:
                            - component: f7-chip
                              config:
                                action: toggle
                                actionCommand: ON
                                actionCommandAlt: OFF
                                actionItem: =props.itemSwitch
                                color: "=(items[props.itemSwitch].state === 'ON') ? 'green' : 'red'"
                                text: "=(items[props.itemSwitch].state === 'ON') ? 'AN' : 'AUS'"
                      - component: f7-col
                        slots:
                          default:
                            - component: oh-trend
                              config:
                                style:
                                  height: 100px
                - component: f7-row
                  config:
                    style:
                      bgcolor: green
                      height: 66px
                      overflow: hidden
                      width: 100%
                  slots:
                    default:
                      - component: f7-col
                        config:
                          style:
                            align-self: flex-end
                            flex-wrap: nowrap
                        slots:
                          default:
                            - component: f7-row
                              config:
                                class:
                                  - justify-content-flex-start
                                style:
                                  flex-wrap: nowrap
                                  width: 100%
                              slots:
                                default:
                                  - component: f7-icon
                                    config:
                                      color: blue
                                      f7: chart_bar
                                      size: 20px
                                      style:
                                        margin-top: 0px
                                      visible: true
                                  - component: Label
                                    config:
                                      style:
                                        font-size: 14px
                                        font-weight: 600
                                        margin-left: 5px
                                        overflow: hidden
                                        text-overflow: ellipsis
                                        white-space: nowrap
                                      text: =(Number.parseFloat(items[props.itemActualPower].state)).toFixed(1) + 'W'
                                      visible: true
                                  - component: f7-icon
                                    config:
                                      color: blue
                                      f7: chart_bar_circle
                                      size: 20px
                                      style:
                                        margin-left: 10px
                                        margin-top: 0px
                                      visible: true
                                  - component: Label
                                    config:
                                      style:
                                        font-size: 14px
                                        font-weight: 600
                                        margin-left: 5px
                                        overflow: hidden
                                        text-overflow: ellipsis
                                        white-space: nowrap
                                      text: =(Number.parseFloat(items[props.itemDailyTotalPower].state)).toFixed(1) +
                                        'kWh'
                                      visible: true
                            - component: f7-row
                              config:
                                class:
                                  - justify-content-flex-start
                                style:
                                  flex-wrap: nowrap
                                  height: 20px
                                  margin-top: 5px
                              slots:
                                default:
                                  - component: f7-icon
                                    config:
                                      color: white
                                      material: restore
                                      size: 18px
                                      style:
                                        margin-left: 0px
                                        margin-top: 0px
                                  - component: Label
                                    config:
                                      style:
                                        color: white
                                        font-size: 12px
                                        margin-left: 8px
                                        overflow: hidden
                                        text-overflow: ellipsis
                                        white-space: nowrap
                                      text: ""
                                  - component: f7-icon
                                    config:
                                      color: gray
                                      f7: chart_bar_square_fill
                                      size: 15px
                                      style:
                                        margin-left: 10px
                                        margin-top: 2px
                                  - component: Label
                                    config:
                                      style:
                                        color: gray
                                        font-size: 12px
                                        margin-left: 3px
                                        overflow: hidden
                                        text-overflow: ellipsis
                                        white-space: nowrap
                                      text: =(Number.parseFloat(items[props.itemTotalePower].state)).toFixed(1) +
                                        'kWh'
          - component: f7-block
            config:
              class:
                - card-prevent-open
                - card-content-padding
              outline: false
            slots:
              default:
                - component: f7-list
                  config: {}
                  slots:
                    default:
                      - component: oh-toggle-item
                        config:
                          color: green
                          icon: oh:poweroutlet
                          item: =props.itemSwitch
                          title: Steckdose
                      - component: oh-label-item
                        config:
                          color: blue
                          icon: f7:chart_bar_circle
                          item: =props.itemDailyTotalPower
                          title: Daily Total Power
                      - component: oh-label-item
                        config:
                          color: blue
                          icon: f7:chart_bar
                          item: =props.itemActualPower
                          title: Actual Power
                      - component: oh-label-item
                        config:
                          color: blue
                          icon: f7:chart_bar_square_fill
                          item: =props.itemTotalePower
                          title: Totale Power
                - component: oh-webframe-card
                  config:
                    borders: false
                    class:
                      - display-block
                    height: 240px
                    noBorder: false
                    noShadow: true
                    src: =props.URL.replace('{period}', vars.selectedPeriod ||
                      [props.timerange.split(',')[0].split(';')[0]])
                - component: f7-segmented
                  config:
                    class:
                      - padding-bottom-half
                    outline: false
                    round: false
                    style:
                      --f7-button-border-radius: 4px
                      --f7-button-font-size: 14px
                      --f7-button-font-weight: 300
                      --f7-button-outline-border-width: 1px
                      --f7-button-padding-horizontal: 0px
                      --f7-button-padding-vertical: 0px
                      --f7-button-text-color: "=themeOptions.dark === 'light' ? 'black' : 'white'"
                      --f7-button-text-transform: none
                      margin-left: 10px
                      margin-right: 10px
                      margin-top: 250px
                  slots:
                    default:
                      - component: oh-repeater
                        config:
                          for: size
                          fragment: true
                          sourceType: range
                        slots:
                          default:
                            - component: oh-repeater
                              config:
                                for: period
                                fragment: true
                                in: =[props.timerange.split(",")[loop.size].split(";")[1]]
                              slots:
                                default:
                                  - component: oh-button
                                    config:
                                      action: variable
                                      actionVariable: selectedPeriod
                                      actionVariableValue: =props.timerange.split(",")[loop.size].split(";")[0]
                                      fill: "=(([props.timerange.split(',')[loop.size].split(';')[0]] ==
                                        vars.selectedPeriod) ||
                                        (props.timerange.split(',')[0].split(';\
                                        ')[1] === loop.period) &&
                                        !vars.selectedPeriod) ? true : false"
                                      outline: true
                                      round: false
                                      style:
                                        --f7-button-border-color: var(--f7-card-outline-border-color)
                                      text: =loop.period


If i extend the widget in a popup on my site it doesn’t fill up 95% of the popup as I defined in the line

--f7-card-expandable-tablet-width: 95%

See picture…How can I define that the expandable widget will fill up 95% of the popup?

It looks like there are probably a couple of overlapping issues here.

--f7-card-expandable-tablet-width, if I recall, only sets the max-width style, not the actual width, so this doesn’t force anything to be a certain width, it just permits it. This is less of an issue.

When you expand a card, you are not actually creating a new popup, you are quite literally changing the shape and the contents of the card element. So, the expanded card that you see is in the same place in the document tree as the card itself. This is relevant because:

The main issue is that when using width %, you must always know (or work to figure out) “% of what?”. With css % unit always works up the page structure tree from the element in question until it finds an ancestor element with a concretely defined value for that style and applies the % to that. In this case, I’m guessing from the blurred background of the image, that you have the widget on a page in either a block column or a masonry column. That means that the parent container of the widget is either a, oh-grid-col, or an oh-masonry and in both cases, those have defined widths. So, even though the popup appears to float across the entire screen, 95% is not 95% of the screen width, it’s 95% of the width of the column that the widget is in.

You can test this easily by setting the --f7-card-expandable-tablet-width to 95vw instead of %, and you will see it stretch across the entire monitor under the left panel, but this also isn’t what you want unless the left panel is always closed.

That test however, gives you one way of solving this. You can know the width of the panel, it’s just defined by the --f7-panel-width variable. So, you could calculate a slightly better width using:

--f7-card-expandable-tablet-width: calc(95vw - var(--f7-panel-width))

This will work most of the time, but it will not be 100% perfectly responsive (for example, if you have the developer tools right-hand panel open). It will be difficult to get better than that without a lot of tweaking of the page css or putting the widget on it’s own row in the page you are using.

I changed it to

uid: Cell_Wallplug
tags: []
props:
  parameters:
    - context: item
      description: A actual power item to display
      label: Item
      name: itemActualPower
      required: false
      type: TEXT
    - context: item
      description: A total power item to display
      label: Item
      name: itemTotalePower
      required: false
      type: TEXT
    - context: item
      description: A daily total power item to display
      label: Item
      name: itemDailyTotalPower
      required: false
      type: TEXT
    - context: item
      description: the switch state
      label: Item
      name: itemSwitch
      required: false
      type: TEXT
    - description: URL to show in the frame
      label: Source URL
      name: URL
      required: true
      type: TEXT
    - default: from=now-6h&to=now;6h,from=now-12h&to=now;12h,from=now-1d&to=now;24h,from=now/d&to=now/d;Day,from=now-3d&to=now;Last
        3 Days,from=now-7d&to=now;Last 7 Days,from=now-14d&to=now;Last 14 Days
      description: Comma-separated List of options. Example
        "from=now-6h&to=now;-6h,from=now-1d/d&to=now-1d/d;yesterday" for past
        "6h" and "yesterday". First entry is default.
      label: Time range options
      name: timerange
      required: true
      type: TEXT
  parameterGroups: []
timestamp: Apr 22, 2024, 8:02:09 AM
component: f7-card
config:
  backdrop: true
  class:
    - card-expandable-animate-width
  expandable: true
  style:
    height: 200px
    --f7-card-expandable-tablet-width: calc(95vw - var(--f7-panel-width))
  swipeToClose: true
slots:
  default:
    - component: oh-button
      config:
        class:
          - cell-open-button
          - card-opened-fade-out
        color: black
        iconF7: expand
        iconSize: 30px
        style:
          padding-bottom: 35px
          padding-top: 10px
          position: absolute
          right: 0
          top: 0
          z-index: 999
    - component: f7-card-content
      config:
        style:
          width: 100%
      slots:
        default:
          - component: oh-icon
            config:
              height: 80px
              icon: poweroutlet
              state: =items[props.itemSwitch].state
              style:
                opacity: 40%
                position: absolute
                right: 16px
                top: 120px
              width: 80px
          - component: oh-button
            config:
              class:
                - card-opened-fade-in
                - cell-close-button
                - card-close
              color: black
              iconF7: xmark_circle_fill
              iconSize: 30px
              style:
                padding-bottom: 35px
                padding-top: 10px
                position: absolute
                right: 0
                top: 0
                z-index: 999
          - component: oh-link
            config:
              action: toggle
              actionCommand: ON
              actionCommandAlt: OFF
              actionItem: =props.itemSwitch
              class:
                - card-prevent-open
              style:
                height: 100%
                left: 0
                position: absolute
                top: 0
                width: 100%
                z-index: 0
          - component: f7-block
            config:
              class:
                - no-padding
              style:
                height: 200px
                margin: 0px
            slots:
              default:
                - component: f7-row
                  config:
                    bgcolor: green
                    style:
                      height: 30px
                  slots:
                    default:
                      - component: Label
                        config:
                          style:
                            font-size: 25px
                            font-weight: 600
                          text: steckdose
                - component: f7-row
                  config:
                    bgcolor: green
                    style:
                      flex-wrap: nowrap
                      height: 80px
                      white-space: nowrap
                  slots:
                    default:
                      - component: f7-col
                        config:
                          width: 30
                        slots:
                          default:
                            - component: f7-chip
                              config:
                                action: toggle
                                actionCommand: ON
                                actionCommandAlt: OFF
                                actionItem: =props.itemSwitch
                                color: "=(items[props.itemSwitch].state === 'ON') ? 'green' : 'red'"
                                text: "=(items[props.itemSwitch].state === 'ON') ? 'AN' : 'AUS'"
                      - component: f7-col
                        slots:
                          default:
                            - component: oh-trend
                              config:
                                style:
                                  height: 100px
                - component: f7-row
                  config:
                    style:
                      bgcolor: green
                      height: 66px
                      overflow: hidden
                      width: 100%
                  slots:
                    default:
                      - component: f7-col
                        config:
                          style:
                            align-self: flex-end
                            flex-wrap: nowrap
                        slots:
                          default:
                            - component: f7-row
                              config:
                                class:
                                  - justify-content-flex-start
                                style:
                                  flex-wrap: nowrap
                                  width: 100%
                              slots:
                                default:
                                  - component: f7-icon
                                    config:
                                      color: blue
                                      f7: chart_bar
                                      size: 20px
                                      style:
                                        margin-top: 0px
                                      visible: true
                                  - component: Label
                                    config:
                                      style:
                                        font-size: 14px
                                        font-weight: 600
                                        margin-left: 5px
                                        overflow: hidden
                                        text-overflow: ellipsis
                                        white-space: nowrap
                                      text: =(Number.parseFloat(items[props.itemActualPower].state)).toFixed(1) + 'W'
                                      visible: true
                                  - component: f7-icon
                                    config:
                                      color: blue
                                      f7: chart_bar_circle
                                      size: 20px
                                      style:
                                        margin-left: 10px
                                        margin-top: 0px
                                      visible: true
                                  - component: Label
                                    config:
                                      style:
                                        font-size: 14px
                                        font-weight: 600
                                        margin-left: 5px
                                        overflow: hidden
                                        text-overflow: ellipsis
                                        white-space: nowrap
                                      text: =(Number.parseFloat(items[props.itemDailyTotalPower].state)).toFixed(1) +
                                        'kWh'
                                      visible: true
                            - component: f7-row
                              config:
                                class:
                                  - justify-content-flex-start
                                style:
                                  flex-wrap: nowrap
                                  height: 20px
                                  margin-top: 5px
                              slots:
                                default:
                                  - component: f7-icon
                                    config:
                                      color: white
                                      material: restore
                                      size: 18px
                                      style:
                                        margin-left: 0px
                                        margin-top: 0px
                                  - component: Label
                                    config:
                                      style:
                                        color: white
                                        font-size: 12px
                                        margin-left: 8px
                                        overflow: hidden
                                        text-overflow: ellipsis
                                        white-space: nowrap
                                      text: ""
                                  - component: f7-icon
                                    config:
                                      color: gray
                                      f7: chart_bar_square_fill
                                      size: 15px
                                      style:
                                        margin-left: 10px
                                        margin-top: 2px
                                  - component: Label
                                    config:
                                      style:
                                        color: gray
                                        font-size: 12px
                                        margin-left: 3px
                                        overflow: hidden
                                        text-overflow: ellipsis
                                        white-space: nowrap
                                      text: =(Number.parseFloat(items[props.itemTotalePower].state)).toFixed(1) +
                                        'kWh'
          - component: f7-block
            config:
              class:
                - card-prevent-open
                - card-content-padding
              outline: false
            slots:
              default:
                - component: f7-list
                  config: {}
                  slots:
                    default:
                      - component: oh-toggle-item
                        config:
                          color: green
                          icon: oh:poweroutlet
                          item: =props.itemSwitch
                          title: Steckdose
                      - component: oh-label-item
                        config:
                          color: blue
                          icon: f7:chart_bar_circle
                          item: =props.itemDailyTotalPower
                          title: Daily Total Power
                      - component: oh-label-item
                        config:
                          color: blue
                          icon: f7:chart_bar
                          item: =props.itemActualPower
                          title: Actual Power
                      - component: oh-label-item
                        config:
                          color: blue
                          icon: f7:chart_bar_square_fill
                          item: =props.itemTotalePower
                          title: Totale Power
                - component: oh-webframe-card
                  config:
                    borders: false
                    class:
                      - display-block
                    height: 240px
                    noBorder: false
                    noShadow: true
                    src: =props.URL.replace('{period}', vars.selectedPeriod ||
                      [props.timerange.split(',')[0].split(';')[0]])
                - component: f7-segmented
                  config:
                    class:
                      - padding-bottom-half
                    outline: false
                    round: false
                    style:
                      --f7-button-border-radius: 4px
                      --f7-button-font-size: 14px
                      --f7-button-font-weight: 300
                      --f7-button-outline-border-width: 1px
                      --f7-button-padding-horizontal: 0px
                      --f7-button-padding-vertical: 0px
                      --f7-button-text-color: "=themeOptions.dark === 'light' ? 'black' : 'white'"
                      --f7-button-text-transform: none
                      margin-left: 10px
                      margin-right: 10px
                      margin-top: 250px
                  slots:
                    default:
                      - component: oh-repeater
                        config:
                          for: size
                          fragment: true
                          sourceType: range
                        slots:
                          default:
                            - component: oh-repeater
                              config:
                                for: period
                                fragment: true
                                in: =[props.timerange.split(",")[loop.size].split(";")[1]]
                              slots:
                                default:
                                  - component: oh-button
                                    config:
                                      action: variable
                                      actionVariable: selectedPeriod
                                      actionVariableValue: =props.timerange.split(",")[loop.size].split(";")[0]
                                      fill: "=(([props.timerange.split(',')[loop.size].split(';')[0]] ==
                                        vars.selectedPeriod) ||
                                        (props.timerange.split(',')[0].split(';\
                                        ')[1] === loop.period) &&
                                        !vars.selectedPeriod) ? true : false"
                                      outline: true
                                      round: false
                                      style:
                                        --f7-button-border-color: var(--f7-card-outline-border-color)
                                      text: =loop.period

but it looks now like this

With

    --f7-card-expandable-tablet-width: 35vw

it looks okay…

Keep in mind, that without more specific details about how you are deploying the widget, my suggestions remain educated guesses. If you want more detailed help, you’ll have to also post the configuration that you’re using for the widget page, tell me what version of OH you are on, the screen setup where you are viewing the widget. All of these tings could impact the results you are seeing.

my page config:

widget are from

config:
  label: Zimmer Wohnzimmer
  sidebar: true
blocks:
  - component: oh-block
    config: {}
    slots:
      default:
        - component: oh-grid-row
          config: {}
          slots:
            default:
              - component: oh-grid-col
                config:
                  width: "50"
                slots:
                  default:
                    - component: widget:Cell_Light_Card_1
                      config:
                        title: Licht
                        header: Wohnen
                        icon: lightbulb
              - component: oh-grid-col
                config:
                  width: "50"
                slots:
                  default:
                    - component: widget:Cell_Light_Card_1
                      config:
                        title: Licht
                        header: Essen
                        icon: lightbulb
              - component: oh-grid-col
                config:
                  width: "50"
                slots:
                  default:
                    - component: widget:Cell_Light_Card_1
                      config:
                        title: Licht
                        header: Gang
                        icon: lightbulb
              - component: oh-grid-col
                config:
                  width: "50"
                slots:
                  default:
                    - component: widget:Cell_Light_Card_1
                      config:
                        title: Licht
                        header: Küche
                        icon: lightbulb
  - component: oh-block
    config: {}
    slots:
      default:
        - component: oh-grid-row
          config: {}
          slots:
            default:
              - component: oh-grid-col
                config:
                  width: "100"
                  xlarge: "50"
                  large: "50"
                slots:
                  default:
                    - component: widget:Cell_Temp_Card_1
                      config:
                        title: Temperatur
                        icon: thermometer
              - component: oh-grid-col
                config:
                  width: "100"
                  xlarge: "50"
                  large: "50"
                  medium: "100"
                  small: "100"
                  xsmall: "100"
                slots:
                  default:
                    - component: widget:Cell_Speaker_Card_1
                      config:
                        title: Sonos
                        header: Playbar
                        icon: speaker_3
                        item: SonosWohnzimmer_Fernbedienung
                        item_volume: SonosWohnzimmer_Lautstarke
                        item_cover: SonosWohnzimmer_Coverbild
              - component: oh-grid-col
                config:
                  width: "50"
                  xlarge: "33"
                  large: "33"
                slots:
                  default:
                    - component: widget:Cell_Shutter_Card_1
                      config:
                        title: Storen
                        header: Essen 1
                        icon: arrow_up_arrow_down
              - component: oh-grid-col
                config:
                  width: "50"
                  xlarge: "33"
                  large: "33"
                slots:
                  default:
                    - component: widget:Cell_Shutter_Card_1
                      config:
                        title: Storen
                        header: Essen 2
                        icon: arrow_up_arrow_down
              - component: oh-grid-col
                config:
                  width: "50"
                  xlarge: "33"
                  large: "33"
                slots:
                  default:
                    - component: widget:Cell_Shutter_Card_1
                      config:
                        title: Storen
                        header: Wohnen
                        icon: arrow_up_arrow_down
  - component: oh-block
    config: {}
    slots:
      default:
        - component: oh-grid-row
          config: {}
          slots:
            default:
              - component: oh-grid-col
                config:
                  width: "50"
                slots:
                  default:
                    - component: widget:Cell_Light_Card_1
                      config:
                        title: Licht
                        header: Wohnen
                        icon: lightbulb
              - component: oh-grid-col
                config:
                  width: "50"
                slots:
                  default:
                    - component: widget:Cell_Light_Card_1
                      config:
                        title: Licht
                        header: Essen
                        icon: lightbulb
              - component: oh-grid-col
                config:
                  width: "50"
                slots:
                  default:
                    - component: widget:Cell_Wallplug
                      config:
                        itemActualPower: Z_way_number_WallPlug9_actualpower
                        itemTotalePower: Z_way_number_WallPlug9_totalpower
                        itemDailyTotalPower: number_wallplug9dailytotalenergy
              - component: oh-grid-col
                config:
                  width: "50"
                slots:
                  default:
                    - component: widget:Cell_Light_Card_1
                      config:
                        title: Licht
                        header: Essen
                        icon: lightbulb
                        itemSwitch: Z_way_switch_WallPlug9

The overview page from where the Wohnzimmer is opened as pop-up

config:
  label: Mein Zuhause
  sidebar: true
blocks:
  - component: oh-block
    config: {}
    slots:
      default:
        - component: oh-grid-row
          config: {}
          slots:
            default:
              - component: oh-grid-col
                config:
                  large: "20"
                  xlarge: "20"
                  medium: "33"
                  width: "50"
                slots:
                  default:
                    - component: widget:Cell_Card_1
                      config:
                        title: Aktiviere Szene
                        header: Morgen
                        icon: sunrise
                        item: Szene
                        command: "1"
                        bgcolor: rgba(233, 196, 106, 0.5)
              - component: oh-grid-col
                config:
                  large: "20"
                  xlarge: "20"
                  medium: "33"
                  width: "50"
                slots:
                  default:
                    - component: widget:Cell_Card_1
                      config:
                        title: Aktiviere Szene
                        header: Tag
                        icon: sun_max
                        item: Szene
                        command: "2"
                        bgcolor: rgba(244, 162, 97, 0.5)
              - component: oh-grid-col
                config:
                  large: "20"
                  xlarge: "20"
                  medium: "33"
                  width: "50"
                slots:
                  default:
                    - component: widget:Cell_Card_1
                      config:
                        title: Aktiviere Szene
                        header: Abend
                        icon: sunset
                        item: Szene
                        command: "3"
                        bgcolor: rgba(231, 111, 81, 0.5)
              - component: oh-grid-col
                config:
                  large: "20"
                  xlarge: "20"
                  medium: "33"
                  width: "50"
                slots:
                  default:
                    - component: widget:Cell_Card_1
                      config:
                        title: Aktiviere Szene
                        header: Nacht
                        icon: moon_zzz
                        item: Szene
                        command: "4"
                        bgcolor: rgba(38, 70, 83, 0.5)
              - component: oh-grid-col
                config:
                  large: "20"
                  xlarge: "20"
                  medium: "33"
                  width: "50"
                slots:
                  default:
                    - component: widget:Cell_Card_1
                      config:
                        title: Hauptschalter
                        header: Alles aus
                        icon: zzz
                        bgcolor: rgba(2, 48, 71, 0.8)
                        item: Szene
                        command: "5"
  - component: oh-block
    config: {}
    slots:
      default:
        - component: oh-grid-row
          config: {}
          slots:
            default:
              - component: oh-grid-col
                config:
                  width: "100"
                  xsmall: "100"
                  small: "100"
                  medium: "40"
                  large: "40"
                  xlarge: "40"
                slots:
                  default:
                    - component: widget:Cell_Weather_1
                      config:
                        title: Wetter
                        header: Alles aus
                        icon: zzz
                        item: Szene
                        command: "5"
              - component: oh-grid-col
                config:
                  width: "100"
                  xsmall: "100"
                  small: "100"
                  medium: "30"
                  large: "30"
                  xlarge: "30"
                slots:
                  default:
                    - component: widget:Cell_Weather_Actual_1
                      config:
                        title: Aussen
                        item_temp: Wetterstation_Aussentemperatur
                        item_hum: Wetterstation_Luftfeuchtigkeit
                        item_rain: Wetterstation_Regenheute
                        item_strike: Wetterstation_LightningStrikeCount
                        item_ill: Wetterstation_Helligkeit
                        item_wind: Wetterstation_WindDurchschnitt
                        item_wind_dir: Wetterstation_Windrichtung
                        page: Test2
              - component: oh-grid-col
                config:
                  width: "50"
                  xsmall: "50"
                  small: "50"
                  medium: "10"
                  large: "10"
                  xlarge: "10"
                slots:
                  default:
                    - component: widget:Cell_Garden_1
                      config:
                        title: Garten
                        item_zone: WateringAutomatic_CurrentZone
                        item_soil_hum: SensorSensorSoilHumidity
              - component: oh-grid-col
                config:
                  width: "50"
                  xsmall: "50"
                  small: "50"
                  medium: "10"
                  large: "10"
                  xlarge: "10"
                slots:
                  default:
                    - component: widget:Cell_Pool_1
                      config:
                        title: Pool
                        item_temp: SHELLY_Temperatur_Pool
                        item_pump: SHELLY_PoolPump_OnOff
              - component: oh-grid-col
                config:
                  width: "50"
                  xsmall: "50"
                  small: "50"
                  medium: "10"
                  large: "10"
                  xlarge: "10"
                slots:
                  default:
                    - component: widget:Cell_Settings_1
                      config:
                        item_battery: GroupBatteryLevelCritical
                        page: page_29fff8448f
  - component: oh-block
    config: {}
    slots:
      default:
        - component: oh-grid-row
          config: {}
          slots:
            default:
              - component: oh-grid-col
                config:
                  large: "25"
                  xlarge: "25"
                  medium: "33"
                  small: "50"
                  width: "100"
                slots:
                  default:
                    - component: widget:Card_room_12
                      config:
                        text_header: Wohnzimmer
                        status: LichterWohnung
                        heating: SHELLY_Heizung_Wohnung
                        temp: SHELLY_Temperatur_Wohnung_correct
                        settemp: SHELLY_Soll_Temperatur_Wohnung
                        humidity: SHELLY_Humidity_Wohnung
                        page: page_37d05f1a2b
                        blinds_closed: StorenState
                        speakers: SonosWohnzimmer_Fernbedienung
                        windows: GroupWindowsWohnzimmerState
                        windows_numbers: GroupWindowsWohnzimmerNumber
                        illuminance: GroupIlluminanceWohnzimmer
                        iconimage: livingroom
              - component: oh-grid-col
                config:
                  width: "100"
                  xlarge: "25"
                  large: "25"
                  medium: "33"
                  small: "50"
                slots:
                  default:
                    - component: widget:Card_room_12
                      config:
                        text_header: Eltern
                        status: Group_Lights_ElternSchlafzimmer
                        heating: SHELLY_Heizung_Zimmer_Eltern
                        temp: SHELLY_Temperatur_Zimmer_Eltern_correct
                        settemp: SHELLY_Soll_Temperatur_Zimmer_Eltern
                        humidity: SHELLY_Humidity_Zimmer_Eltern
                        speakers: SonosEltern_Fernbedienung
                        page: ZimmerEltern
                        iconimage: myparents
              - component: oh-grid-col
                config:
                  width: "100"
                  small: "50"
                  medium: "33"
                  large: "25"
                  xlarge: "25"
                slots:
                  default:
                    - component: widget:Card_room_12
                      config:
                        text_header: GIRL
                        heating: SHELLY_Heizung_Zimmer_GIRL
                        temp: SHELLY_Temperatur_Zimmer_GIRL_correct
                        settemp: SHELLY_Soll_Temperatur_Zimmer_GIRL
                        humidity: SHELLY_Humidity_Zimmer_GIRL
                        status: LichterGIRL
                        speakers: SonosGIRL_Fernbedienung
                        page: ZimmerGIRL
                        windows: FensterGIRL1_Contact
                        illuminance: FensterGIRL1_Lux
                        iconimage: mygirl
              - component: oh-grid-col
                config:
                  width: "100"
                  small: "50"
                  medium: "33"
                  large: "25"
                  xlarge: "25"
                slots:
                  default:
                    - component: widget:Card_room_12
                      config:
                        text_header: BOY
                        iconimage: myboy
                        heating: SHELLY_Heizung_Zimmer_BOY
                        temp: SHELLY_Temperatur_Zimmer_BOY_correct
                        settemp: SHELLY_Soll_Temperatur_Zimmer_BOY
                        humidity: SHELLY_Humidity_Zimmer_BOY
                        status: LichterBOY
                        speakers: SonosBOY_Fernbedienung
                        page: ZimmerBOY
                        windows: FensterBOY_Contact
                        illuminance: FensterBOY_Lux
              - component: oh-grid-col
                config:
                  width: "100"
                  small: "50"
                  medium: "33"
                  large: "25"
                  xlarge: "25"
                slots:
                  default:
                    - component: widget:Card_room_12
                      config:
                        text_header: Eingangsbereich
                        iconimage: myfrontdoor
                        door_lock: SmartLock_Action
                        door_state: SmartLock_DoorSensorState
                        boiler_temp: Boiler_Temperatur
                        status: LichterEingang
                        page: page_c498bc9132
              - component: oh-grid-col
                config:
                  width: "100"
                  small: "50"
                  medium: "33"
                  large: "25"
                  xlarge: "25"
                slots:
                  default:
                    - component: widget:Card_room_12
                      config:
                        text_header: Bad/WC
                        iconimage: bathroom
                        status: LichterBadWC
                        temp: ShellyHTSHHT1_Temperatur
                        humidity: ShellyHTSHHT1_Luftfeuchtigkeit
                        page: page_b986cb7442
              - component: oh-grid-col
                config:
                  width: "100"
                  small: "50"
                  medium: "33"
                  large: "25"
                  xlarge: "25"
                slots:
                  default:
                    - component: widget:Card_room_12
                      config:
                        text_header: Hobbyraum / Keller
                        heating: SHELLY_Heizung_Hobbyraum
                        temp: SHELLY_Temperatur_Hobbyraum_correct
                        settemp: SHELLY_Soll_Temperatur_Hobbyraum
                        humidity: SHELLY_Humidity_Hobbyraum
                        iconimage: myhobbyroom
                        status: LichterHobbyraum
                        page: ZimmerHobby
                        illuminance: LichtsensorUG_Beleuchtungsstarke
              - component: oh-grid-col
                config:
                  width: "100"
                  small: "50"
                  medium: "33"
                  large: "25"
                  xlarge: "25"
                slots:
                  default:
                    - component: widget:Card_room_12
                      config:
                        text_header: Waschküche
                        iconimage: mylaundry
                        temp: SensorWaschkuche_Sensortemperature
                        humidity: SensorWaschkuche_Sensorrelativehumidity
                        page: page_9a9ffe53b4
masonry: []

That’s strange that your basic pages require 35vw instead of 95vw, but if you’ve found something that works that’s good.

If you don’t feel that gives you quite enough control, you can also use the screen object in the expressions and calculate a more precise width that way: