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

var not being recognized #155

Closed
JaneOri opened this issue Jul 24, 2022 · 0 comments · Fixed by #163
Closed

var not being recognized #155

JaneOri opened this issue Jul 24, 2022 · 0 comments · Fixed by #163

Comments

@JaneOri
Copy link

JaneOri commented Jul 24, 2022

Corset v1 and v2

in the following Corset sheet code, var(--onSelected, false) is resolving as false:

      [role="group"] {
        --onSelected: ${x => console.log(x)};
        event: pointerdown bind(
          ${this.someEvent},
          var(--onSelected, false)
        );
        event: keydown bind(
          ${this.someEvent},
          var(--onSelected, false)
        );
      }
  someEvent (selCB, ev) {
    // ... do stuff
    selCB && selCB(1) // selCB is false :(
  }

Changing the variable to --on-selected resolves errors - might have a toLowerCase() happening(?) but vars are case sensitive

Ty! 💜

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 a pull request may close this issue.

1 participant