vimesh-ui icon indicating copy to clipboard operation
vimesh-ui copied to clipboard

tailwind styles are dropped with x-include ?

Open bakman2 opened this issue 2 years ago • 2 comments

Example:

<template x-if="user == ''">
   <div x-include="user.html"></div>
</template>

user.html

<div class="w-full py-8 space-y-4">
  <div class="rounded p-4 text-white bg-blue-500 text-center text-xl font-medium">User</div>
  <template x-for="name in users">
    <div class="rounded p-4 text-white bg-gray-700 cursor-pointer hover:bg-blue-600" @click="user = name.username">
      <div>
        <div x-text="name.display"></div>
        <div class="text-xs text-gray-400" x-text="name.username"></div>
      </div>
    </div>
  </template>
</div>

Issue: Some styles are rendered, others are not ? (ie. there is no "bg-blue-500" and the "space-y-4" is being ignored, very strange behaviour ?

image

bakman2 avatar Nov 03 '23 06:11 bakman2

I am using tailwind via cdn, which is javascript, perhaps the styles are not applied when new files are coming in ?

bakman2 avatar Nov 04 '23 04:11 bakman2

I could not reproduce your issue. Please check https://stackblitz.com/edit/web-platform-4hvvxb?file=index.html

xinjie-zhang avatar Nov 04 '23 08:11 xinjie-zhang