cancel
Showing results for 
Search instead for 
Did you mean: 

PCF: standard PowerApp CSS classes for component

Including own CSS with custom control is nice, but this prevent the control from changing with the L&F of the App it is used in. Would be great if a list of CSS-classes were available to use in controls, where the actual styling is controlled by the parent App.
This should include font (family, size, color), bordercolor, backgroundcolor, etc.

Status: Under Review
Comments
PowerApps Staff

We have a new theming system in PCF which will come out soon.  However it won't let you hook directly into CSS classes, but rather allow you to consume theme values via control properties.

 

The main reason for this is that we don't want close coupling between the control implmentation and styling.  Another reason is the ability to sytle different instances of controls on the same page differently - with CSS this becomes a lot more difficult to support than via control properties.  

 

However it will be up to the control maker to expose the properties they feel are necessary for the control, as many or as few as they feel are needed.

Level: Powered On

Hi FilipK,

 

Do I understand correctly my control should for example expose a property 'ReadonlyColor', and the consumer of the control can set this to a value the control can apply? 

How will this work in Model Apps? Or will there be default values applied from the parent context?

PowerApps Staff
Status changed to: Under Review