Skip to content

maxWidth props does propagate till span of tooltip #8807

@Ashish-vyp

Description

@Ashish-vyp

Provide a general summary of the issue here

maxWidth props which we pass in tooltip component reaches to the div an accommodating the width provided but in the span in which text is rendered stays intact to
.spectrum-Tooltip-label {
max-inline-size: var(--spectrum-tooltip-content-max-width);
}

Causing the text to wrap unexpectedly.

🤔 Expected Behavior?

maxWidth props should propagate till the span

😯 Current Behavior

maxWidth props which we pass in tooltip component reaches to the div an accommodating the width provided but in the span in which text is rendered stays intact to
.spectrum-Tooltip-label {
max-inline-size: var(--spectrum-tooltip-content-max-width);
}

💁 Possible Solution

No response

🔦 Context

No response

🖥️ Steps to Reproduce

{readOnlyButtonMessage}
It renders as:

読み取り専用フィールドを表示
The issue: the text in the tooltip is wrapping, and it looks like the maxWidth isn't properly applied to the inner (spectrum-Tooltip-label). That span has this style:

.spectrum-Tooltip-label {
max-inline-size: var(--spectrum-tooltip-content-max-width);
}
But --spectrum-tooltip-content-max-width doesn’t seem to inherit the value from maxWidth="size-3000".

Version

Spectrum 2

What browsers are you seeing the problem on?

Other

If other, please specify.

All

What operating system are you using?

Mac

🧢 Your Company/Team

Adobe

🕷 Tracking Issue

No response

Metadata

Metadata

Assignees

No one assigned

    Projects

    Status

    🔬 To Investigate / Verify

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions