Is there a way to format the colour of a card when you have a list in gallery view?

Copper Contributor

I currently have my COSHH list set so that when an item is overdue the item is highlighted in red. When you move over to the galley view it loses this format and on would logically assume that the card will be highlighted in the same way. Is there a feature that does this already or should it be submitted as an idea?

 

Thanks,

2 Replies

@LukeJSmith You can color the tiles in gallery view using JSON view formatting.

 

You need to add background-color style to your tile (div element). Example: techan_k twitter post 

 

DocumentationGallery layout customizations 


Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.

@ganeshsanap so currently this is how the background of the card is handled.. 

 

"elmType": "div",
"attributes": {
"class": "ms-bgColor-white sp-css-borderColor-black sp-card-borderHighlight sp-card-subContainer"
 
How would i go about changing this to red when the due date is passed