microsoft / microsoft/AdaptiveCards
[Rendering] JS, padding for containers with Default background
Open
Nobody has claimed this yet.
Area-Renderers
Bug
- Dominant language
- C#
- Stars
- 2k
- Forks
- 595
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 1
Description
Target Platforms
NodeJS
SDK Version
1.3
Application Name
Viva Connections
Problem Description
It seems like a bug, and not by design that containers with Default background color have no padding as containers with any other background color have padding. Can we get padding added for this scenario?
Screenshots

Card JSON
{
"type": "AdaptiveCard",
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"version": "1.3",
"body": [
{
"type": "TextBlock",
"text": "Container properties",
"wrap": true,
"horizontalAlignment": "Center",
"height": "stretch",
"fontType": "Default",
"size": "Large",
"color": "Accent"
},
{
"type": "TextBlock",
"text": "Style: style",
"wrap": true,
"size": "Medium",
"weight": "Bolder",
"color": "Accent"
},
{
"type": "Container",
"items": [
{
"type": "TextBlock",
"text": "(not set)",
"wrap": true
}
]
},
{
"type": "Container",
"items": [
{
"type": "TextBlock",
"text": "Default",
"wrap": true
}
],
"style": "default"
},
{
"type": "Container",
"items": [
{
"type": "TextBlock",
"text": "Emphasis",
"wrap": true
}
],
"style": "emphasis"
},
{
"type": "Container",
"items": [
{
"type": "TextBlock",
"text": "Accent",
"wrap": true
}
],
"style": "accent"
},
{
"type": "Container",
"items": [
{
"type": "TextBlock",
"text": "Good",
"wrap": true
}
],
"style": "good"
},
{
"type": "Container",
"items": [
{
"type": "TextBlock",
"text": "Attention",
"wrap": true
}
],
"style": "attention"
},
{
"type": "Container",
"items": [
{
"type": "TextBlock",
"text": "Warning",
"wrap": true
}
],
"style": "warning"
},
{
"type": "TextBlock",
"text": "---",
"wrap": true
},
{
"type": "TextBlock",
"text": "Style: bleed (with style = Accent)",
"wrap": true,
"size": "Medium",
"weight": "Bolder",
"color": "Accent"
},
{
"type": "Container",
"items": [
{
"type": "TextBlock",
"text": "False - Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
"wrap": true
}
]
},
{
"type": "Container",
"bleed": true,
"items": [
{
"type": "TextBlock",
"text": "True - Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
"wrap": true
}
],
"style": "accent"
},
{
"type": "TextBlock",
"text": "---",
"wrap": true
},
{
"type": "TextBlock",
"text": "Background image: fillMode (URL set)",
"wrap": true,
"size": "Medium",
"weight": "Bolder",
"color": "Accent"
},
{
"type": "TextBlock",
"text": "Cover",
"wrap": true
},
{
"type": "Container",
"backgroundImage": {
"url": "https://microsoft.sharepoint-df.com/teams/MEEDemo/SiteAssets/Dashboard/tree-small.jpeg"
},
"items": [
{
"type": "TextBlock",
"text": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
"wrap": true
}
],
"bleed": true
},
{
"type": "TextBlock",
"text": "RepeatHorizontally",
"wrap": true
},
{
"type": "Container",
"items": [
{
"type": "TextBlock",
"text": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
"wrap": true
}
],
"backgroundImage": {
"url": "https://microsoft.sharepoint-df.com/teams/MEEDemo/SiteAssets/Dashboard/tree-small.jpeg",
"fillMode": "RepeatHorizontally"
}
},
{
"type": "TextBlock",
"text": "RepeatVertically",
"wrap": true
},
{
"type": "Container",
"items": [
{
"type": "TextBlock",
"text": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
"wrap": true
}
],
"backgroundImage": {
"url": "https://microsoft.sharepoint-df.com/teams/MEEDemo/SiteAssets/Dashboard/tree-small.jpeg",
"fillMode": "RepeatVertically"
}
},
{
"type": "TextBlock",
"text": "Repeat",
"wrap": true
},
{
"type": "Container",
"items": [
{
"type": "TextBlock",
"text": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
"wrap": true
}
],
"backgroundImage": {
"url": "https://microsoft.sharepoint-df.com/teams/MEEDemo/SiteAssets/Dashboard/tree-small.jpeg",
"fillMode": "Repeat"
}
},
{
"type": "TextBlock",
"text": "---",
"wrap": true
}
],
"backgroundImage": {
"horizontalAlignment": "Center"
},
"minHeight": "0px"
}
Sample Code Language
No response
Sample Code
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in the JavaScript renderer and reproduce the issue with the provided Adaptive Card JSON on NodeJS. Compare containers using the Default background with containers using other styles; done means Default-style containers receive the expected padding without changing the other rendering examples.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100