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

Using properties inside strings should be replaced with the variable value instead of the name #73

Open
Mad-Kat opened this issue Feb 23, 2024 · 0 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@Mad-Kat
Copy link
Collaborator

Mad-Kat commented Feb 23, 2024

If you use a property inside double quotes, yak should replace the double quotes and the expression with the CSS variable.

So this:

const Input = styled.input<{$placeholder: string}>`
  &::before {
    content: "${p => p.$placeholder}";
  }
`;

should result in:

.Input {
  &::before {
    content: var(--🦬1sstj5p0);
  }
}

but results in:

.Input {
  &::before {
    constent: "var(--🦬1sstj5p0)";
  }
}
@jantimon jantimon added the bug Something isn't working label Jun 21, 2024
@jantimon jantimon added the good first issue Good for newcomers label Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants