Skip to content
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

Merged
merged 5 commits into from
Mar 8, 2023

Conversation

eljefe223
Copy link
Contributor

Previous Behavior

The style attribute is not applied to the text when block is set.

New Behavior

The style should be applied to the text, as it is when block is not set.

image

Related Issue(s)

@eljefe223 eljefe223 self-assigned this Mar 8, 2023
@eljefe223 eljefe223 requested a review from a team as a code owner March 8, 2023 19:11
@fabricteam
Copy link
Collaborator

fabricteam commented Mar 8, 2023

📊 Bundle size report

🤖 This report was generated against 487984c48f621c01643ad569b2cde759d393bbf4

@codesandbox-ci
Copy link

codesandbox-ci bot commented Mar 8, 2023

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:

Sandbox Source
@fluentui/react 8 starter Configuration
@fluentui/react-components 9 starter Configuration

@size-auditor
Copy link

size-auditor bot commented Mar 8, 2023

Asset size changes

Size Auditor did not detect a change in bundle size for any component!

Baseline commit: 487984c48f621c01643ad569b2cde759d393bbf4 (build)

Comment on lines 39 to 43
${/* slot defaults display to contents, this ensures slotted items inherit from the host */ ''}
slot {
display: inherit;
}

Copy link
Member

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;
  }

Copy link
Member

@chrisdholt chrisdholt left a 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.

packages/web-components/src/text/text.styles.ts Outdated Show resolved Hide resolved
eljefe223 and others added 2 commits March 8, 2023 14:07
@chrisdholt
Copy link
Member

closes #27048

@chrisdholt chrisdholt merged commit 443b8d8 into web-components-v3 Mar 8, 2023
@chrisdholt chrisdholt deleted the users/jes/fix-style-and-block branch March 8, 2023 22:40
chrisdholt added a commit that referenced this pull request Apr 29, 2024
* 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>
radium-v pushed a commit to radium-v/fluentui that referenced this pull request Apr 29, 2024
* 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>
radium-v pushed a commit to radium-v/fluentui that referenced this pull request Apr 29, 2024
* 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>
radium-v pushed a commit to radium-v/fluentui that referenced this pull request Apr 30, 2024
* 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>
radium-v pushed a commit that referenced this pull request Apr 30, 2024
* 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>
radium-v pushed a commit that referenced this pull request May 2, 2024
* 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>
radium-v pushed a commit that referenced this pull request May 2, 2024
* 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>
radium-v pushed a commit that referenced this pull request May 2, 2024
* 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>
radium-v pushed a commit that referenced this pull request May 3, 2024
* 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>
radium-v pushed a commit that referenced this pull request May 6, 2024
* 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>
radium-v pushed a commit that referenced this pull request May 6, 2024
* 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>
radium-v pushed a commit that referenced this pull request May 8, 2024
* 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>
radium-v pushed a commit that referenced this pull request May 10, 2024
* 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants