Why does adoptStyles
re-assign the list? shouldn't it spread any existing adopted stylesheets in?
#2517
bennypowers
started this conversation in
Ideas
Replies: 1 comment
-
Yeah, I think this is a bit of a rough edge. Calling It looks like there's inconsistency between how styles are handled when |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
While working on a "StylesController" which adds CSSResults to an element, I imported
adoptStyles
from 'lit' to use that in my implementation, but that broke chrome-based browsers.I looked at the code and found that
adoptStyles
clobbers the list. Even Google's own docs on the feature recommend appending to the list, so how come lit's version doesn't?Lit's version:
lit/packages/reactive-element/src/css-tag.ts
Lines 143 to 145 in 7453e36
My working version:
Beta Was this translation helpful? Give feedback.
All reactions