nuxt / icon

The <Icon> component, supporting Iconify, Emojis and custom components.
https://stackblitz.com/edit/nuxt-icon-playground?file=app.vue
MIT License
874 stars 38 forks source link

Position icon vertically in line with text #61

Closed some-user123 closed 1 year ago

some-user123 commented 1 year ago

I'm using nuxt-icon and would like to have icons in my text. They should behave like a normal letter and should be vertically aligned with other letters.

Example:

X <Icon name="ic:baseline-home" /> x

is displayed like this: image

As you can see, the icon is positioned too low. Too me this does not seem nice. I would like it at the same position as the x or X, not below. Can this be done using this component?

Atinux commented 1 year ago

I believe you need to handle this yourself @some-user123

You can use multiple solution in CSS in order to achieve this.

codesinging commented 1 year ago

try vertical-align: -0.125em;