Skip to content

Commit

Permalink
fix: add border and adjust padding to badge component (#19268)
Browse files Browse the repository at this point in the history
* add border and adjust padding to badge component

* Change files
  • Loading branch information
khamudom authored Aug 5, 2021
1 parent e5561d9 commit 23bd45d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "add border and adjust padding to badge component",
"packageName": "@fluentui/web-components",
"email": "[email protected]",
"dependentChangeType": "patch"
}
4 changes: 3 additions & 1 deletion packages/web-components/src/badge/badge.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
foregroundOnAccentRest,
neutralFillRest,
neutralForegroundRest,
strokeWidth,
typeRampMinus1FontSize,
typeRampMinus1LineHeight,
} from '../design-tokens';
Expand All @@ -26,7 +27,8 @@ export const badgeStyles: (
.control {
border-radius: calc(${controlCornerRadius} * 1px);
padding: calc(${designUnit} * 0.5px) calc(${designUnit} * 1px);
padding: calc(((${designUnit} * 0.5) - ${strokeWidth}) * 1px) calc((${designUnit} - ${strokeWidth}) * 1px);
border: calc(${strokeWidth} * 1px) solid transparent;
}
:host(.lightweight) .control {
Expand Down

0 comments on commit 23bd45d

Please sign in to comment.