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

Icon coloring for links #571

Open
LandonSchropp opened this issue Sep 29, 2024 · 4 comments
Open

Icon coloring for links #571

LandonSchropp opened this issue Sep 29, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@LandonSchropp
Copy link

Describe the bug

When an icon is included as part of a link to another page, it doesn't share the color of the link in edit mode.

Here's an example of what the icon looks like in the file tree:

Screenshot 2024-09-29 at 12 55 08 PM

And here's an example of the icon within the link:

Screenshot 2024-09-29 at 12 57 36 PM

And how it renders when the cursor isn't inside the link:

Screenshot 2024-09-29 at 12 57 30 PM

Screenshot 2024-09-29 at 12 55 08 PM

The icon color is also off for icons pasted directly into links:

Screenshot 2024-09-29 at 1 04 47 PM

To Reproduce

Steps to reproduce the behavior:

  1. In a new vault, install the Iconize plugin and enable it.
  2. Create a new page named Pizza.
  3. Set the Pizza page's icon to LiPizza
  4. Create a new page
  5. Paste in a link to the pizza page: [[Pizza]]

Another way to reproduce this is to add an icon explicitly in a link.

  1. In a new vault, install the Iconize plugin and enable it.
  2. Create a new page
  3. Paste in the following markdown: [:LiPizza: Pizza](http://example.com)

Expected behavior

In my opinion, the icon should be inside the anchor. I'd expect it to match the link's color.

Additional context

Thanks for the great plugin!

@LandonSchropp
Copy link
Author

To solve this issue for myself, I added the following CSS snippet:

.iconize-icon-in-link {
  color: var(--link-color);
}

However, this feels like something that should be solved in the plugin, so I'll leave this issue open. 🙂

@FlorianWoelki FlorianWoelki added the enhancement New feature or request label Oct 15, 2024
@ShaneNZ
Copy link

ShaneNZ commented Oct 17, 2024

I use the colour configuration for the icons, so my folder view looks like this (ignore the background colours, that's just extra CSS):
image
Rather than the inline links matching the link colour, I'd actually like them to match the colours as set in the plugin and visible in the file explorer.

Not sure if this is the same or different request, but there's an obvious overlap so adding the comment here.

@LandonSchropp
Copy link
Author

@ShaneNZ Maybe the icons could default to the link color unless a custom color is set, in which case they'd use that instead?

@ShaneNZ
Copy link

ShaneNZ commented Oct 17, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: No status
Development

No branches or pull requests

3 participants