Search code examples
cssvue.jstailwind-cssfont-facetailwind-3

Tailwind, Vue problem with non-English characters when using tags right after eachother


I am facing an issue when using tags right after eachother(ex: span, 'a' and 'p'). characters merge with each other, although they are in seperate html tags!

How can I prevent that from happing?

    <a href="" class="underline mx-1">حریم شخصی</a>
    <a href="">استفاده</a>

    <span>حریم</span>
    <span>استفاده</span>
    <span>حریم</span>

Codepen: https://codepen.io/blackcrowxyz/pen/jOZOZoR

What I want:(استفاده حریم is right) enter image description here

What I get:(استفادهحریم is wrong) enter image description here

sample output:

enter image description here

enter image description here


Solution

  • The solution is to use &nbsp; because every character in between tags, will prevent the issue from happening.

        <span>قوانین و شرایط استفاده</span>
        &nbsp;
        <span>حریم شخصی</span>
    

    result:

    enter image description here