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 size not applying correctly with css variables in chromium #1277

Open
4 of 30 tasks
ihateblueb opened this issue Dec 9, 2024 · 0 comments
Open
4 of 30 tasks

icon size not applying correctly with css variables in chromium #1277

ihateblueb opened this issue Dec 9, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@ihateblueb
Copy link

Description

When I use the tabler/icons-svelte package, I use the large font size css variable for the size so I can keep my sizes consistent.

	<Button quaternary>
		<IconCube size="var(--fs-lg)" />
		Sample Button (quaternary)
	</Button>

Firefox and Safari seem to handle this fine right now, but Chromium doesn't.

Firefox:
image
image

Chromium:
image
image

I have a temporary fix for my use that finds the size and adds a width and height style to the element and then it looks how I expected.

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.24.0

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 IconCube (import { IconCube } from '@tabler/icons-svelte';)
  2. Use icon with size attribute set as a CSS variable (<IconCube size="var(--fs-lg)" />)

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.)
@ihateblueb ihateblueb added the bug Something isn't working label Dec 9, 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