I created the following widget,
but struggling with the text alignment. Column 2 and 3 should both be aligned right.
component: f7-card
config:
style:
border-radius: 20px
background-color: rgba(6,25,36)
--text-color: rgba(255,255,255,1)
slots:
default:
- component: f7-block
config:
class:
- no-padding
- no-margin
style:
width: 100%
height: 100%
position: absolute
top: 0
left: 0
border-radius: 20px
- component: f7-row
slots:
default:
- component: f7-col
slots:
default:
- component: f7-row
slots:
default:
- component: f7-col
config:
style:
width: 20%
class:
- padding-top
- padding-bottom
slots:
default:
- component: oh-image
config:
url: /static/icons/thermometer.svg
height: 100px
- component: f7-col
config:
style:
width: 40%
slots:
default:
- component: f7-row
slots:
default:
- component: Label
config:
text: =props.meterName1 + ':'
style:
color: var(--text-color)
font-size: 18px
line-height: 30px
text-align: right
white-space: nowrap
overflow: hidden
text-overflow: ellipsis
class:
- padding-top
- margin-right
- component: f7-row
slots:
default:
- component: Label
config:
text: =props.meterName2 + ':'
style:
color: var(--text-color)
font-size: 18px
line-height: 30px
text-align: right
white-space: nowrap
overflow: hidden
text-overflow: ellipsis
class:
- margin-right
- component: f7-row
slots:
default:
- component: Label
config:
text: =props.meterName3 + ':'
style:
color: var(--text-color)
font-size: 18px
line-height: 30px
text-align: right
white-space: nowrap
overflow: hidden
text-overflow: ellipsis
- component: f7-row
slots:
default:
- component: Label
config:
text: =props.meterName4 + ':'
style:
color: var(--text-color)
font-size: 18px
line-height: 30px
text-align: right
white-space: nowrap
overflow: hidden
text-overflow: ellipsis
class:
- padding-bottom
- component: f7-col
config:
style:
width: 40%
slots:
default:
- component: f7-row
slots:
default:
- component: Label
config:
text: "=(props.showDigits) ? items[props.thermometer1].state : Math.round(items[props.thermometer1].state.split(' ')[0]) + ' ' + items[props.thermometer1].state.split(' ')[1]"
style:
color: var(--text-color)
font-size: 18px
line-height: 30px
text-align: right
white-space: nowrap
overflow: hidden
text-overflow: ellipsis
class:
- text-align-right
- padding-top
- component: f7-row
slots:
default:
- component: Label
config:
text: "=(props.showDigits) ? items[props.thermometer2].state : Math.round(items[props.thermometer2].state.split(' ')[0]) + ' ' + items[props.thermometer4].state.split(' ')[1]"
style:
color: var(--text-color)
font-size: 18px
line-height: 30px
text-align: right
white-space: nowrap
overflow: hidden
text-overflow: ellipsis
class:
- text-align-right
- component: f7-row
slots:
default:
- component: Label
config:
text: "=(props.showDigits) ? items[props.thermometer3].state : Math.round(items[props.thermometer3].state.split(' ')[0]) + ' ' + items[props.thermometer3].state.split(' ')[1]"
style:
color: var(--text-color)
font-size: 18px
line-height: 30px
white-space: nowrap
overflow: hidden
text-overflow: ellipsis
class:
- text-align-right
- component: f7-row
slots:
default:
- component: Label
config:
text: "=(props.showDigits) ? items[props.thermometer4].state : Math.round(items[props.thermometer4].state.split(' ')[0]) + ' ' + items[props.thermometer4].state.split(' ')[1]"
style:
color: var(--text-color)
font-size: 18px
line-height: 30px
text-align: right
white-space: nowrap
overflow: hidden
text-overflow: ellipsis
class:
- padding-bottom
- text-align-right
Non of the technics does have an effect on the alignment, neither
class:
- text-align-right
nor
style:
text-align: right
Is there something obvious I’m defining wrong here?