-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: [text] block breaks the style attribute #27129
Conversation
📊 Bundle size report🤖 This report was generated against 487984c48f621c01643ad569b2cde759d393bbf4 |
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 05ffe80:
|
Asset size changesSize Auditor did not detect a change in bundle size for any component! Baseline commit: 487984c48f621c01643ad569b2cde759d393bbf4 (build) |
${/* slot defaults display to contents, this ensures slotted items inherit from the host */ ''} | ||
slot { | ||
display: inherit; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would really prefer to not do this if we can avoid it - it's definitely not ideal. Do we actually need inheritance in this case?
What about simply using a selector list for block to make sure both get updated?
:host([block]),
:host([block]) ::slotted(*) {
display: block;
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@eljefe223 I think we want to revert this last change as well. This way, the default for any text node slotted is inline and only setting block changes that to block.
Co-authored-by: Chris Holt <chhol@microsoft.com>
closes #27048 |
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
Previous Behavior
The
style
attribute is not applied to the text whenblock
is set.New Behavior
The
style
should be applied to the text, as it is whenblock
is not set.Related Issue(s)
block
breaks thestyle
attribute. #27048