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

Filled icons from sprite are drawn non-filled #1213

Open
5 of 30 tasks
bobrof opened this issue Aug 26, 2024 · 0 comments
Open
5 of 30 tasks

Filled icons from sprite are drawn non-filled #1213

bobrof opened this issue Aug 26, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@bobrof
Copy link

bobrof commented Aug 26, 2024

Description

I suppose this behaviour is due to the filled icons are imported with attributes <symbol id="tabler-filled-bell" fill="none" stroke="currentColor" .... One possible workaround could possibly be changing fill attribute to currentColor for filled icons

Package

  • @tabler/icons
  • @tabler/icons-eps
  • @tabler/icons-pdf
  • @tabler/icons-png
  • @tabler/icons-webfont
  • @tabler/icons-sprite
  • @tabler/icons-preact
  • @tabler/icons-react
  • @tabler/icons-react-native
  • @tabler/icons-solid
  • @tabler/icons-svelte
  • @tabler/icons-vue
  • Figma plugin
  • source/main
  • other/not relevant

Version

3.13

Browser

  • Chrome/Chromium
  • Firefox
  • Safari
  • Edge
  • iOS Safari
  • Opera
  • Other/not relevant

Operating system

  • Windows
  • Linux
  • macOS
  • ChromeOS
  • iOS
  • Android
  • Other/not relevant

Steps to reproduce

  1. Import tabler icons sprite
  2. Use filled-bell icon: <use xlink:href="path/to/tabler-sprite.svg#tabler-filled-bell" />
  3. Non filled icon is drawn

Svg extraction from latest 3.13 version with example:

<svg xmlns="http://www.w3.org/2000/svg"><defs>
  <symbol id="tabler-filled-bell" viewBox="0 0 24 24" fill="currentColor" stroke="none" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
  <path d="M14.235 19c.865 0 1.322 1.024 .745 1.668a3.992 3.992 0 0 1 -2.98 1.332a3.992 3.992 0 0 1 -2.98 -1.332c-.552 -.616 -.158 -1.579 .634 -1.661l.11 -.006h4.471z" />
  <path d="M12 2c1.358 0 2.506 .903 2.875 2.141l.046 .171l.008 .043a8.013 8.013 0 0 1 4.024 6.069l.028 .287l.019 .289v2.931l.021 .136a3 3 0 0 0 1.143 1.847l.167 .117l.162 .099c.86 .487 .56 1.766 -.377 1.864l-.116 .006h-16c-1.028 0 -1.387 -1.364 -.493 -1.87a3 3 0 0 0 1.472 -2.063l.021 -.143l.001 -2.97a8 8 0 0 1 3.821 -6.454l.248 -.146l.01 -.043a3.003 3.003 0 0 1 2.562 -2.29l.182 -.017l.176 -.004z" />
  </symbol>
</defs></svg>
<svg class="w-10 h-10 text-green-500">
  <!-- Icon is drawn non-filled  -->
  <use href="#tabler-filled-bell" fill="blue" stroke="none"/>
</svg>

Checklist

  • I have searched if someone has submitted a similar issue before and there weren't any. (Please make sure to also search closed issues, as this issue might already have been resolved.)
@bobrof bobrof added the bug Something isn't working label Aug 26, 2024
@tabler tabler deleted a comment Aug 26, 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
Projects
None yet
Development

No branches or pull requests

1 participant