Forum Discussion

Andrew_O10's avatar
Andrew_O10
Copper Contributor
Sep 10, 2022
Solved

Icon changes font in SP Gallery formatting

Hi All,   I'm new to json and am trying to use icons in my titles.  When I use an icon, it changes the font to Times New Roman.  If I force Arial or other, the icon shows an error.   Is there a way...
  • Andrew_O10's avatar
    Sep 11, 2022

    Got it working.

     

    "children": [
              {
                "elmType": "div",
                "attributes": {
                  "class": "sp-card-displayColumnContainer"
                },
                "children": [
                  {
                    "elmType": "span",
                    "style": {
                      "font-size": "1.30em"
                    },
                    "attributes": {
                      "iconName": "lightbulb",
                      "class": "sp-css-color-yellow"
                    }
                  },
                  {
                    "elmType": "span",
                    "style": {
                      "font-size": ".9em"
                    },
                    "txtContent": "=if ([$Title] == '', '–',' '+ [$Title])",
                    "attributes": {
                      "class": "sp-field-fontSizeSmall sp-css-color-BlackText sp-card-highlightedContent"
                    }
                  }
                ]

Resources