using getInlineAnchorList with Mantine

I'm trying to inject a Mantine button into multiple components at the same time using getInlineAnchorList() using document.querySelectorAll() and only the first button is rendering properly, the rest are unstyled mantine buttons
21 Replies
MoreThanYourAverageJoe#3911
for example^
lab
lab•2y ago
can you try inspecting the button and see if the style tag is appended
MoreThanYourAverageJoe#3911
it is yeah
MoreThanYourAverageJoe#3911
this is what the unstyled button looks like^
MoreThanYourAverageJoe#3911
and the styled button
lab
lab•2y ago
hehhhh that's a bug in CSUI inline anchor imo
MoreThanYourAverageJoe#3911
I think so
lab
lab•2y ago
it should inejct the style for each one of those shadowDOM I wonder why it's not doing that :d........ 1 hypothesis I can think of is.... did you create a single style element at the top of your CSUI?
MoreThanYourAverageJoe#3911
yeah shoudl I be creating more than 1
lab
lab•2y ago
yeah, I think it references the exact same one and thus the getStyle just apply each other so only the last getStyle call can get the style element hmmm
MoreThanYourAverageJoe#3911
but taht means they should both inherit the styles no?
lab
lab•2y ago
interesting I think that's not the case bc getStyle works with the style element itself and element in DOM are referenced like pointer, not by value
MoreThanYourAverageJoe#3911
what would be the solution? or temporary solution
lab
lab•2y ago
yeah I'm thinking working on something atm btw mb if I'm slow xd
Want results from more Discord servers?
Add your server