function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Akansha RangariAkansha Rangari 

Dynamic Expression in the CSS file?

Hello,
I have component where I am selecting color by color picker and I want to show the text in that selected color code without using Style tag. How to acheive this in lightning component or is there any other way to do so.

Thanks in Advance!
ShivankurShivankur (Salesforce Developers) 
Hi Akansha,

As per this update (https://releasenotes.docs.salesforce.com/en-us/spring18/release-notes/rn_lc_style_tag.htm), <style> Tag Not Allowed in Components after Spring 18 release.

You might want to check with similar discussion here:
https://salesforce.stackexchange.com/questions/150523/expressions-in-the-css-file

Also,check out few implementations done around with similar type in the community here:
https://salesforce.stackexchange.com/questions/193776/color-picker-for-lightning-component

Hope above information helps. Please mark as Best Answer so that it can help others in future.

Thanks.