Skip to main content
15-Moonstone
August 25, 2020
Solved

How to change Value Display Text colour through CSS?

  • August 25, 2020
  • 2 replies
  • 1948 views

Hello.

 

I am using the new Value Display widget from 8.5, and I need to be able to change the fallback-text colour (TextIfNoValue colour) through css. Can someone please indicate me how can I access this property, so I can change it?

 

Thank you.

Best answer by Rick-Stanley

This guide demonstrates how to get started applying CSS to widgets:

https://developer.thingworx.com/en/resources/guides/css-quickstart

2 replies

5-Regular Member
August 25, 2020

This guide demonstrates how to get started applying CSS to widgets:

https://developer.thingworx.com/en/resources/guides/css-quickstart

Radu15-MoonstoneAuthor
15-Moonstone
August 25, 2020

Thank you for your answer. Unfortunately, the guide doesn't help me. I'm interested in how it is possible to access the colour property of the value display TextIfNoValue field. I tried using Inspect Element for this, but it hasn't helped.

 

If there's a thing the guide is missing, it's how to actually find the fields that you want to change, instead of just copy-pasting CSS snippets.

5-Regular Member
August 25, 2020

It is not obvious how to the CSS reference, There is a note on this page that explains you need to add `root_` to the widget ID:

https://developer.thingworx.com/en/resources/guides/css-quickstart/use-media-queries-css-quickstart

You can also use an Expression Function to dynamically bind a CSS class to a widget based on values passed into the Expression

Community Manager
September 14, 2020

Hi @Radu.

 

If one of the previous responses answered your question, please mark the appropriate one as the Accepted Solution for the benefit of others with the same question.

 

Thank you for your participation in our community.

 

Regards.

 

--Sharon