Skip to content

class="$$props.class" is not working, but would be good to have a function to solve this: #422

Open
@moisesbites

Description

Describe the bug

When using $$props.class in a component, the windicss classes is not working inside the component:

Fo example, in the page:

<SomeComponent class="text-blue-700" />

In the SomeComponent:

<span class="{$$props.class}">some text</span>

The text would be blue-700 but is not working.
But if I put inside the component the same windicss class I'm passing into in another snippet of page , the classes work correctly in both texts. For example:

In the SomeComponent:

<span class="{$$props.class}">some text</span>
<span class="text-blue-700">another text</span>

System Info

System:
    OS: Linux 5.13 Linux Mint 20.2 (Uma)
    CPU: (4) x64 Intel(R) Core(TM) i5-2400 CPU @ 3.10GHz
    Memory: 9.42 GB / 23.37 GB
    Container: Yes
    Shell: 5.0.17 - /bin/bash
  Binaries:
    Node: 16.11.0 - ~/.nvm/versions/node/v16.11.0/bin/node
    npm: 8.3.0 - ~/.nvm/versions/node/v16.11.0/bin/npm
  IDEs:
    Nano: 4.8 - /usr/bin/nano
    VSCode: 1.63.2 - /usr/bin/code
  Browsers:
    Chrome: 97.0.4692.71
    Chromium: 96.0.4664.110
    Firefox: 95.0.1

Used Package Manager

npm

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions