# Ignition Perspective Style Classes not working

**URL:** <https://forum.inductiveautomation.com/t/ignition-perspective-style-classes-not-working/89688>\
**Category:** General Discussion\
**Tags:** perspective\
**Created:** [April 30, 2024, 9:48am UTC](https://forum.inductiveautomation.com/t/ignition-perspective-style-classes-not-working/89688 "2024-04-30T09:48:36Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![TheM](https://avatars.discourse-cdn.com/v4/letter/t/278dde/32.png) [@TheM](https://forum.inductiveautomation.com/u/TheM)\
**Post date:** [April 30, 2024, 9:48am UTC](https://forum.inductiveautomation.com/t/ignition-perspective-style-classes-not-working/89688/1 "2024-04-30T09:48:36Z")

</div>

Hello there!  
I am new to Ignition and struggling to get Style Classes to work.  
Followed Animated Style Classes videos on Inductive University: [Perspective Components And Bindings Animated Style Classes](https://inductiveuniversity.com/video/animated-style-classes/8.1?r=%2Fvideo%2Fsearch%2F%3Fq%3Dstyle%26checked_topics%3D)

 ![StyleClassesAnim](https://us1.discourse-cdn.com/inductiveautomation/original/3X/3/d/3da6a3c1acbca0f375ef71a3f707e088398bab6e.jpeg)

but still cant get it to work.  
Maybe someone could assist me or point in the right direction?

---

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [April 30, 2024, 10:01am UTC](https://forum.inductiveautomation.com/t/ignition-perspective-style-classes-not-working/89688/2 "2024-04-30T10:01:24Z")

</div>

The way the class name is written in italic means that it wasn't saved. Try saving your work and see if it does anything.

Also, did you configure a style for `100%` in the style class ? You're only showing the style for `0%`. It needs at least 2 states.

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [April 30, 2024, 10:04am UTC](https://forum.inductiveautomation.com/t/ignition-perspective-style-classes-not-working/89688/3 "2024-04-30T10:04:59Z")

</div>

Your configuration worked for me in Designer. (I defined a background color for both 0% and 100%.) I didn't have to save the project first.

---

<div class="post-metadata">

**Author:** ![TheM](https://avatars.discourse-cdn.com/v4/letter/t/278dde/32.png) [@TheM](https://forum.inductiveautomation.com/u/TheM)\
**Post date:** [April 30, 2024, 10:12am UTC](https://forum.inductiveautomation.com/t/ignition-perspective-style-classes-not-working/89688/4 "2024-04-30T10:12:54Z")

</div>

Project saved and both 0% and 100% background colors set. I even added extra stops just to test but it won`t work!

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [April 30, 2024, 10:24am UTC](https://forum.inductiveautomation.com/t/ignition-perspective-style-classes-not-working/89688/5 "2024-04-30T10:24:38Z")

</div>

Maybe post the JSON (formatted with the \</\> button) for

- the label
- the Blink style definition
- your Ignition version

and we can try to replicate.

---

<div class="post-metadata">

**Author:** ![TheM](https://avatars.discourse-cdn.com/v4/letter/t/278dde/32.png) [@TheM](https://forum.inductiveautomation.com/u/TheM)\
**Post date:** [April 30, 2024, 11:14am UTC](https://forum.inductiveautomation.com/t/ignition-perspective-style-classes-not-working/89688/6 "2024-04-30T11:14:05Z")

</div>

Not sure how to even do it.

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [April 30, 2024, 11:18am UTC](https://forum.inductiveautomation.com/t/ignition-perspective-style-classes-not-working/89688/7 "2024-04-30T11:18:27Z")

</div>

- Right-click on label. Copy.
- Paste into your reply. Select the code you've just pasted and click the \</\> button.
- Right-click on the Blink style definition. Copy.
- Paste into your reply. Select the code you've just pasted and click the \</\> button.

See [Wiki - how to post code on this forum](https://forum.inductiveautomation.com/t/wiki-how-to-post-code-on-this-forum/77831).

---

<div class="post-metadata">

**Author:** ![andrew.budaiev](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/andrew.budaiev/32/72921_2.png) [@andrew.budaiev](https://forum.inductiveautomation.com/u/andrew.budaiev)\
**Post date:** [April 30, 2024, 11:22am UTC](https://forum.inductiveautomation.com/t/ignition-perspective-style-classes-not-working/89688/8 "2024-04-30T11:22:08Z")

</div>

Try setting transform Output Type as Style Class.

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [April 30, 2024, 11:27am UTC](https://forum.inductiveautomation.com/t/ignition-perspective-style-classes-not-working/89688/9 "2024-04-30T11:27:21Z")

</div>

> [@andrew.budaiev](#):
>
> ... Output Type as Style Class.

Oooh! Cool. I hadn't replicated the Map Transform so wouldn't have picked up on it. I've never noticed it before.

@TheM, do it here:

 ![Map transform style class](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/5/c5b34652cc3729165c3e5891ed09aae8cca54a11.png)

As a matter of interest, can anyone explain why a string value wouldn't work here?

---

<div class="post-metadata">

**Author:** ![TheM](https://avatars.discourse-cdn.com/v4/letter/t/278dde/32.png) [@TheM](https://forum.inductiveautomation.com/u/TheM)\
**Post date:** [April 30, 2024, 11:31am UTC](https://forum.inductiveautomation.com/t/ignition-perspective-style-classes-not-working/89688/10 "2024-04-30T11:31:20Z")

</div>

Style:

```python
@keyframes psc-Blink-anim {
  0% {
    background-color: #FF0000;
  }
  100% {
    background-color: #FFFF47;
  }
}
.psc-Blink {
  animation-name: psc-Blink-anim;
  animation-delay: 0s;
  animation-direction: normal;
  animation-duration: 2s;
  animation-fill-mode: both;
  animation-iteration-count: infinite;
  animation-timing-function: linear;
}

```

Label:

```python
[
  {
    "type": "ia.display.label",
    "version": 0,
    "props": {
      "text": "Label",
      "style": {}
    },
    "meta": {
      "name": "Label"
    },
    "position": {
      "x": 265,
      "y": 311,
      "width": 422,
      "height": 230
    },
    "custom": {},
    "propConfig": {
      "props.style.classes": {
        "binding": {
          "type": "tag",
          "config": {
            "fallbackDelay": 2.5,
            "mode": "direct",
            "tagPath": "[default]Test_Bit"
          },
          "transforms": [
            {
              "fallback": "",
              "inputType": "scalar",
              "mappings": [
                {
                  "input": false,
                  "output": ""
                },
                {
                  "input": true,
                  "output": "Blink"
                }
              ],
              "outputType": "scalar",
              "type": "map"
            }
          ]
        }
      }
    }
  }
]

```

Ignition 8.1.39

---

<div class="post-metadata">

**Author:** ![TheM](https://avatars.discourse-cdn.com/v4/letter/t/278dde/32.png) [@TheM](https://forum.inductiveautomation.com/u/TheM)\
**Post date:** [April 30, 2024, 11:33am UTC](https://forum.inductiveautomation.com/t/ignition-perspective-style-classes-not-working/89688/11 "2024-04-30T11:33:15Z")

</div>

Tried to change Output class to Style Class but same result. No animation.

---

<div class="post-metadata">

**Author:** ![andrew.budaiev](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/andrew.budaiev/32/72921_2.png) [@andrew.budaiev](https://forum.inductiveautomation.com/u/andrew.budaiev)\
**Post date:** [April 30, 2024, 11:35am UTC](https://forum.inductiveautomation.com/t/ignition-perspective-style-classes-not-working/89688/12 "2024-04-30T11:35:34Z")

</div>

> [@Transistor](#):
>
> As a matter of interest, can anyone explain why a string value wouldn't work here?

I've tried and It is working as a value I was just throwing blind guesses....

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [April 30, 2024, 11:36am UTC](https://forum.inductiveautomation.com/t/ignition-perspective-style-classes-not-working/89688/13 "2024-04-30T11:36:25Z")

</div>

> [@andrew.budaiev](#):
>
> I was just throwing blind guesses....

You get a ❤ for honesty.

---

<div class="post-metadata">

**Author:** ![andrew.budaiev](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/andrew.budaiev/32/72921_2.png) [@andrew.budaiev](https://forum.inductiveautomation.com/u/andrew.budaiev)\
**Post date:** [April 30, 2024, 11:42am UTC](https://forum.inductiveautomation.com/t/ignition-perspective-style-classes-not-working/89688/14 "2024-04-30T11:42:33Z")

</div>

Can it be that your fancy ultrawide monitor can't handle a style class? 😅  
Also, is it working in the session?

---

<div class="post-metadata">

**Author:** ![TheM](https://avatars.discourse-cdn.com/v4/letter/t/278dde/32.png) [@TheM](https://forum.inductiveautomation.com/u/TheM)\
**Post date:** [April 30, 2024, 11:44am UTC](https://forum.inductiveautomation.com/t/ignition-perspective-style-classes-not-working/89688/15 "2024-04-30T11:44:22Z")

</div>

🤣

---

<div class="post-metadata">

**Author:** ![TheM](https://avatars.discourse-cdn.com/v4/letter/t/278dde/32.png) [@TheM](https://forum.inductiveautomation.com/u/TheM)\
**Post date:** [April 30, 2024, 11:57am UTC](https://forum.inductiveautomation.com/t/ignition-perspective-style-classes-not-working/89688/16 "2024-04-30T11:57:08Z")

</div>

No! I doesn't work in session ether.

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [April 30, 2024, 11:58am UTC](https://forum.inductiveautomation.com/t/ignition-perspective-style-classes-not-working/89688/17 "2024-04-30T11:58:35Z")

</div>

I'm not able to reproduce the problem. It just works for me - even with a map transform set to value.

---

<div class="post-metadata">

**Author:** ![andrew.budaiev](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/andrew.budaiev/32/72921_2.png) [@andrew.budaiev](https://forum.inductiveautomation.com/u/andrew.budaiev)\
**Post date:** [April 30, 2024, 12:08pm UTC](https://forum.inductiveautomation.com/t/ignition-perspective-style-classes-not-working/89688/18 "2024-04-30T12:08:03Z")

</div>

Will it work if you disable animation and it's just colour change?

---

<div class="post-metadata">

**Author:** ![TheM](https://avatars.discourse-cdn.com/v4/letter/t/278dde/32.png) [@TheM](https://forum.inductiveautomation.com/u/TheM)\
**Post date:** [April 30, 2024, 12:45pm UTC](https://forum.inductiveautomation.com/t/ignition-perspective-style-classes-not-working/89688/19 "2024-04-30T12:45:47Z")

</div>

Looks like my Style Classes not working at all. Tried with background color change only without animation or just changing text size it won`t work 🙄

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [April 30, 2024, 12:59pm UTC](https://forum.inductiveautomation.com/t/ignition-perspective-style-classes-not-working/89688/20 "2024-04-30T12:59:10Z")

</div>

Create a new view, new label and new style. There's something goofed up somewhere. You're into "Did you try switching it off and on again?" territory.

[Next page](https://forum.inductiveautomation.com/t/ignition-perspective-style-classes-not-working/89688.md?page=2)
