cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X

how to apply custom css on textfield textarea background-color.

Hrishabh.Sharma
11-Garnet

how to apply custom css on textfield textarea background-color.

Hrishab108_0-1690336563033.png

how to apply custom css on textfield textarea background-color.

 

 

ACCEPTED SOLUTION

Accepted Solutions

Hi @Hrishabh.Sharma 

 

You can dynamically change the StyleTheme property value based on your use case using an expression.

 

Velkumar_0-1690436917524.png 

 

Velkumar_1-1690436970096.png

 

The reason why I'm insisting to use StyleTheme. In the recent Thingworx upgrade, PTC changed CSS Syntax which does not support custom CSS values - Solved: Custom CSS new syntax for specific button - PTC Community

 

If you still want to use custom CSS you can use the old syntax 

 

.myCustomClass ptcs-textfield::part(text-box){
   background : #000000
}

 

/VR

 

 

View solution in original post

4 REPLIES 4

Hi @Hrishabh.Sharma 

 

You can change the text area color in Style Properties 

 

Velkumar_0-1690353608958.png

 

Do you have any specific reason to use custom CSS ?

 

/VR

 

Hello @Velkumar ,
thanks!
I know that but i want to apply style definition on textarea by expression using create custom class inputs.
So, I need yaa, How to do this by custom css in thingworx.

Thank you
BR,
Hrishabh Sharma

Hi @Hrishabh.Sharma 

 

You can dynamically change the StyleTheme property value based on your use case using an expression.

 

Velkumar_0-1690436917524.png 

 

Velkumar_1-1690436970096.png

 

The reason why I'm insisting to use StyleTheme. In the recent Thingworx upgrade, PTC changed CSS Syntax which does not support custom CSS values - Solved: Custom CSS new syntax for specific button - PTC Community

 

If you still want to use custom CSS you can use the old syntax 

 

.myCustomClass ptcs-textfield::part(text-box){
   background : #000000
}

 

/VR

 

 

Big Thanks @Velkumar 

BR,
Hrishabh Sharma

Announcements


Top Tags