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

[Bug]: sp-theme applies Adobe font-family to non-Spectrum child elements #5112

Open
1 task done
moikmellah opened this issue Feb 21, 2025 · 1 comment
Open
1 task done
Labels
bug Something isn't working Component: Theme jira ticket created Spectrum CSS triage An issue needing triage

Comments

@moikmellah
Copy link

moikmellah commented Feb 21, 2025

Code of conduct

  • I agree to follow this project's code of conduct.

Impacted component(s)

sp-theme

Expected behavior

The sp-theme element should only apply font-family to encapsulated Spectrum web components, and not to other elements contained in its light DOM.

Actual behavior

The sp-theme element applies system font-family styles to all encapsulated elements through a :host CSS rule applied to its shadow root.

Screenshots

Image

What browsers are you seeing the problem in?

Firefox, Chrome

How can we reproduce this issue?

  1. Wrap a 'div' or other element in an sp-theme
  2. Look at element
  3. Element has Spectrum font-family applied

Sample code or abstract reproduction which illustrates the problem

<sp-theme system="spectrum" color="light" scale="medium">
  <div>This text should not have an Adobe font applied unintentionally.</div>
</sp-theme>

Severity

SEV 4

Logs taken while reproducing problem

No response

@moikmellah moikmellah added bug Something isn't working needs jira ticket triage An issue needing triage labels Feb 21, 2025
@moikmellah
Copy link
Author

Behavior was added with Spectrum 2 support fairly recently, applying the Spectrum font family stack and a few other font-related styles as a :host CSS rule. Prior to that PR sp-theme (at least with the "spectrum" system) didn't apply Spectrum styles to non-Spectrum elements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Component: Theme jira ticket created Spectrum CSS triage An issue needing triage
Projects
None yet
Development

No branches or pull requests

2 participants