Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

v-chakra directive bug : flash of unstyled content when applyed on a external component #436

Open
JulianCataldo opened this issue May 31, 2021 · 1 comment
Labels
status: needs more info 🤔 Needs more information about a specific thing/problem status: needs reproduction ♺ Issue needs a simple reproduction type: contributions welcome 💚 Contributions are welcome!

Comments

@JulianCataldo
Copy link

JulianCataldo commented May 31, 2021

Compare this two :

1 V-chakra directive on a nested component

test.vue

<template>
  <main>
    <c-heading>
      Salut
      <DabadiDabada v-chakra background="red"></DabadiDabada>
    </c-heading>
  </main>
</template>

DabadiDabada.vue

<template>
  <div>
    Lorem ipsum dolor sit amet consectetur adipisicing elit.
  </div>
</template>


2 V-chakra directive on an component living inside the parent

test.vue

<template>
  <main>
    <c-heading>
      Salut
      <div v-chakra background="red">
        Lorem ipsum dolor sit amet consectetur adipisicing elit.
      </div>
    </c-heading>
  </main>
</template>

Results

Screenshot 2021-05-31 at 23 55 14

In both case, it works like above, however you get a flash of styling on case 1.
If you disable javascript (Safari dev menu), styling isn't applied:

Screenshot 2021-05-31 at 23 57 59

With js

Style appended with "className" appendix is added afterward (hence the flash of styling).
Screenshot 2021-05-31 at 23 58 58

No js

No style is appended
Screenshot 2021-05-31 at 23 58 41

Additional note :

If you add some styling on a root chakra component in DabadiDabada.vue, it works along the v-chakra styling on the parent. Still, the styles coming from v-chakra directive suffers from being added afterwards.
Screenshot 2021-06-01 at 0 04 12

@codebender828
Copy link
Collaborator

Hi @JulianCataldo Are you using this in a nuxt project? I'd like to see a reproduction of this if possible.

@codebender828 codebender828 added status: needs more info 🤔 Needs more information about a specific thing/problem status: needs reproduction ♺ Issue needs a simple reproduction type: contributions welcome 💚 Contributions are welcome! labels Jun 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: needs more info 🤔 Needs more information about a specific thing/problem status: needs reproduction ♺ Issue needs a simple reproduction type: contributions welcome 💚 Contributions are welcome!
Projects
None yet
Development

No branches or pull requests

2 participants