sp-dev-docs icon indicating copy to clipboard operation
sp-dev-docs copied to clipboard

sp-field-customFormatBackground

Open spcrux opened this issue 7 years ago • 3 comments

Category

  • [x] Question
  • [ ] Typo
  • [ ] Bug
  • [ ] Additional article idea

Is there more information on how to sp-field-customFormatBackground? It's not really clear how to use this class.

spcrux avatar Dec 11 '18 03:12 spcrux

Basic demos:

{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",
  "elmType": "div",
  "txtContent": "@currentField",
  "attributes": {
    "class": "sp-field-customFormatBackground"
  },
  "style": {
    "color": "red"
  }
}

You can try other properties of the background too: https://www.w3schools.com/css/css_background.asp

Seiyasu avatar Dec 11 '18 06:12 Seiyasu

Hi Seiyasu, Could you please show an example of how this "Specifies the padding and margins for all classes that use backgrounds" as per documentation at https://docs.microsoft.com/en-us/sharepoint/dev/declarative-customization/column-formatting#style-guidelines

spcrux avatar Dec 12 '18 11:12 spcrux

Issues that have been closed & had no follow-up activity for at least 7 days are automatically locked. Please refer to our wiki for more details, including how to remediate this action if you feel this was done prematurely or in error: Issue List: Our approach to locked issues

msft-github-bot avatar Jan 25 '20 18:01 msft-github-bot