Text-Size adjust in smartphone

I have a widget which is shown in a correct manner on my PC. But when using a smartphone the text is cut off.

component: oh-label-cell
config:
  actionAnalyzerChartType: isoWeek
  actionGroupPopupItem: gairquality_01
  footer: =items.garbage_problem_place_Title.state.split(",")[2]
  header: =items.garbage_problem_place_Title.state.split(",")[0] + " - " +
    items.garbage_problem_place_Title.state.split(",")[1]
  item: garbage_grat_Begin
  label: =dayjs(items.garbage_problem_place_Begin.state).format('dddd, DD.MM.YY ')
    + " " +
    items.garbage_problem_place_Title.state.split(",")[3].replace("Uhrzeit","Zeit")
  on: "true"
  stateStyle:
    color: red
    fontSize: 21px
  style:
    background: linear-gradient(to top right,#DC143C 0%,#00FFFF 60%)
  trendGradient: blue
  trendItem: aqaleak_01_devtemp

normally the widget looks:

but in my iPad it looks:

Is there a possibility to change the size dynamically?

thx in advance for help.

Cheers - Peter

True text scaling is, as I understand it, in consideration for the next generation of css, but until then it is actually a little tricky. See here for a brief discussion and some solutions:

1 Like

The expression

  stateStyle:
    color: red
    fontSize: =(device.desktop)?('0.85vw'):('1.5vw')

did the trick. Thx for help and the solution

Cheers - Peter