Closed AverTry closed 8 months ago
I mentioned it in the release notes. https://github.com/lxsmnsyc/solid-styled/releases/tag/v0.10.0
Since
:global
and@global
are still declared in a "local sheet", their behavior will remain as-is. In the future, this behavior might be fixed for consistency.
Ok that was a big misunderstanding as you said "Great that I found a workaround. Wait for a new minor release in a couple of days." Why was the thread closed, if there was no fix?
Yes I thought so, you also say it's fixed, to me that means dynamic globals work???
This I assumed was with the introduction of useSolidStyledGlobal
OK I will leave this alone now. Thanks for your time though.
<style jsx global>
. With the attribute, it's easier to decide what to do with it and so the issue was indeed fixed.css
has a different mechanism compared to the jsx counterpart. Of course, the feature set might be similar however there was no way for me to actually extract which styles are global vs which isn't, which is why I added the reminder that the behavior would remain the same (regardless if it was the style element or the tagged template).What I can recommend you now is to use <style jsx global>
for dynamic global templates, the rest you can use either the tagged template or the jsx form.
Thank you, sorry for getting frustrated, <style jsx global>
does work as intended, I was blind but now I see.
Hi Alexis, I feel really dumb having to ask how-to, I appreciate the time your taking.
As I could not get it working on my test project, I did a fresh install of everything, then as using your example, I simplified it, to see what's going on. I'm not seeing any changes when dynamically adding CSS properties in the Global Scope.
In my example, if I replace the const values with hardcoded values all is good.
What have I missed here? Thanks.
P.S. I used the vite plug-in, not the unpluggin. (Thanks for the peer updates)