Skip to content

Commit

Permalink
fix: [text] block breaks the style attribute (microsoft#27129)
Browse files Browse the repository at this point in the history
* fix: [text] block breaks the style attribute

* chnage files

* addresed comments

* Update packages/web-components/src/text/text.styles.ts

Co-authored-by: Chris Holt <chhol@microsoft.com>

* addressed pr comments

---------

Co-authored-by: Chris Holt <chhol@microsoft.com>
  • Loading branch information
2 people authored and radium-v committed Apr 30, 2024
1 parent 0d5e91c commit 958d608
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": "prerelease",
"comment": "fix: [text] block breaks the style attribute",
"packageName": "@fluentui/web-components",
"email": "jes@microsoft.com",
"dependentChangeType": "patch"
}
4 changes: 3 additions & 1 deletion packages/web-components/src/text/text.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,21 @@ export const styles = css`
line-height: ${lineHeightBase300};
font-weight: ${fontWeightRegular};
text-align: start;
display: inline;
white-space: normal;
overflow: visible;
text-overflow: clip;
margin: 0;
display: inline;
}
:host([nowrap]) ::slotted(*) {
white-space: nowrap;
overflow: hidden;
}
:host([truncate]) ::slotted(*) {
text-overflow: ellipsis;
}
:host([block]),
:host([block]) ::slotted(*) {
display: block;
}
Expand Down

0 comments on commit 958d608

Please sign in to comment.