Skip to content

Wrong parsing of styling #107

@jonassmets

Description

@jonassmets

I'm far from a dev, but I came a cross a problem. It took my e very long time to find the issue.

`views:

  • title: Test
    path: Test
    cards:
    • type: custom:flex-horseshoe-card
      entities:
      • entity: sensor.test
        unit: W
        layout:
        states:
        • id: 0
          entity_index: 0
          xpos: 50
          ypos: 50
          styles:
          • font-size: 8em
          • fill: purple
            hlines:
        • id: 0
          xpos: 50
          ypos: 42
          length: 40
          styles:
          • stroke: orange
          • stroke-width: 10
          • opacity: 1
            show:
            horseshoe_style: lineargradient
            horseshoe_scale:
            min: 0
            max: 100
            color_stops:
            '0': blue
            '50': green
            '100': red
            Testing this card the fontsize isn't correct and the horizontal line wasn't visible. In the console styling looks like this: font-size:8emcolor:var(--primary-text-color);opacity:1.0;text-anchor:middle;fill:purpleand like this:stroke-linecap:round;stroke:orangeopacity:1stroke-width:10`

So styling is messedup. Both lines miss a ; .

Changing the styling in the console, it works.
font-size:8em; color:var(--primary-text-color);opacity:1.0;text-anchor:middle;fill:purple
stroke-linecap:round;stroke:orange; opacity:1stroke-width:10
Hope this can be fixed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions