Forum Discussion
SharePoint List Choice Pills Hex Colors
- Aug 06, 2024
johncrouse62 you could add something like:
"width": "50%","margin-left": "15%"Rob
Los Gallardos
Microsoft Power Automate Community Super User.
Principal Consultant, SharePoint and Power Platform WSP Global (and classic 1967 Morris Traveller driver)
johncrouse62 you could add something like:
Los Gallardos
Microsoft Power Automate Community Super User.
Principal Consultant, SharePoint and Power Platform WSP Global (and classic 1967 Morris Traveller driver)
Rob_Elliott Last question Rob. I have attached two screenies. It seems in Auto Height view I see the entire pill, however, when I choose List or Compact List the bottom edge of the pill is cut off. I tried messing with all of the numbers but can't quite figure out what I am missing. Any thoughts? Here is my code ...
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "div",
"txtContent": "@currentField",
"style": {
"background-color": "=if(@currentField == 'Critical', '#D20303', if(@currentField == 'Warning', '#cbb100', if(@currentField == 'On Target', '#12ae00', if(@currentField == 'Completed', '#8b8680', if(@currentField == 'Cancelled', '#8b8680', ''))",
"color": "#000000",
"box-sizing": "border-box",
"width": "90%",
"margin-left": "5%",
"padding": "4px 8px 5px 8px",
"border-radius": "16px",
"justify-content": "center",
"font-size": "12pt",
"font-weight": "bold"
}
}
Thank, yet again,
John
- Rob_ElliottAug 07, 2024Bronze Contributor
johncrouse62 there might be a way to slightly increase the row height with the row formatting schema, but with the column formatting one the only thing you could do is is to remove the border radius.
Rob
Los Gallardos
Microsoft Power Automate Community Super User.
Principal Consultant, SharePoint and Power Platform WSP Global (and classic 1967 Morris Traveller driver)