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

[Bug?]: cannot use icon without the class="xxx" in "A" link #1010

Closed
2 tasks done
xarthurx opened this issue Aug 17, 2023 · 3 comments
Closed
2 tasks done

[Bug?]: cannot use icon without the class="xxx" in "A" link #1010

xarthurx opened this issue Aug 17, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@xarthurx
Copy link

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Current behavior 😯

image

      <a i-line-md-github-loop target="_blank" href="https://github.com/xarthurx"></a>
      <A i-line-md-github-loop target="_blank" href="https://github.com/xarthurx"></A>
      <A class="i-line-md-github-loop" target="_blank" href="https://github.com/xarthurx"></A>

When using unocss, putting icon class directly in solid-start's A will not display the icon.
The icon name has to be put into a class=<icon-name> format.

But with the normal a DOM, it is shown correctly.

Expected behavior 🤔

A and a will behave the same and both show the icon correctly.

Steps to reproduce 🕹

Steps:

  1. Use A to create a link
  2. put an css-like icon name as a class, without the class=<icon> syntax
  3. render the page

Context 🔦

No response

Your environment 🌎

No response

@xarthurx xarthurx added the bug Something isn't working label Aug 17, 2023
@xarthurx
Copy link
Author

Actually, I realize the <A> tag cannot take any css without the class prefix.

@ryansolid
Copy link
Member

It's because it isn't a known boolean attribute we treat it like a standard attribute when passed through a component. I suppose the native behavior of it working like a boolean is unexpected but this is where things landed after a long debate around this. solidjs/solid#1101

The weird part is I wonder if this bug got re-introduced again. I thought we resolved that we should always treat non-boolean attributes as ="true"

@ryansolid
Copy link
Member

In setting up for SolidStart's next Beta Phase built on Nitro and Vinxi we are closing all PRs/Issues that will not be merged due to the system changing. If you feel your issue was closed by mistake. Feel free to re-open it after updating/testing against 0.4.x release. Thank you for your patience.

See #1139 for more details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants