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

feat: new jsx global #29

Merged
merged 4 commits into from Nov 26, 2023
Merged

feat: new jsx global #29

merged 4 commits into from Nov 26, 2023

Conversation

lxsmnsyc
Copy link
Owner

@lxsmnsyc lxsmnsyc commented Nov 24, 2023

  • <style jsx global> now has a different behavior
    • When provided with dynamic values, previously it would be included to the scoped variables, which is "counter-intuitive" towards its behavior. Now, the dynamic variables are now inserted directly to the document (in CSS, this would be :root. The new behavior is also SSR-friendly, as the variables are generated with :root style and inserted alongside the accompanied style sheet.
    • Internally, this introduces a new primitive called useSolidStyledGlobal.
    • Fixes Global dynamic values scope locally only #28
    • 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.
  • Fix vars declaration to only generate if there's actually any dynamic styles.
  • Fix @global (Fixes @global is broken #18)

@lxsmnsyc lxsmnsyc merged commit decad97 into main Nov 26, 2023
1 check passed
@lxsmnsyc lxsmnsyc deleted the feat-global branch November 26, 2023 07:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Global dynamic values scope locally only @global is broken
1 participant