cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mob
Advocate II
Advocate II

It is possible to declare css in powerapps?

I am trying to use css coding inside HTMLtext....

with inline style I can do some modification, but when I try to use "global" css  classes "." and id-s " # ", the changes are not made.

 

So in powerapps just inline style modification works or do I do somethig wrong?

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-micsh-msft
Community Support
Community Support

Hi mob,

 

If you mean the HTMLtext control in PowerApps, I am afraid currently declare Css global attributes is not available.

It seems to be that HTMLText control currently can't have the HTML <Head> tag work with it.

As the documentation states:

" HTMLText – Text that appears in an HTML text control and that may contain HTML tags." Reference.

And yes, inline style works.

21.PNG

 

If you would like PowerApp to enable this feature, then please submit this through the PowerApps idea forum:

PowerApps Ideas

Regards

 

 

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-micsh-msft
Community Support
Community Support

Hi mob,

 

If you mean the HTMLtext control in PowerApps, I am afraid currently declare Css global attributes is not available.

It seems to be that HTMLText control currently can't have the HTML <Head> tag work with it.

As the documentation states:

" HTMLText – Text that appears in an HTML text control and that may contain HTML tags." Reference.

And yes, inline style works.

21.PNG

 

If you would like PowerApp to enable this feature, then please submit this through the PowerApps idea forum:

PowerApps Ideas

Regards

 

 

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Not technically, but you could set global variables in the the OnStart method.

 

Set(myCss, {h1: "font-size: 16px; color: red"});

 


Then in the HTML text control...

 

"<div style='" & myCss.h1 & "'>Test</div>"

 

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PWREduCon768x460.png

Join us at PWR EduCon - A Power Platform Conference

Learn from the top Power BI, Power Apps, Power Automate & Power Virtual Agents experts!

Top Solution Authors
Top Kudoed Authors
Users online (3,266)