Skip to content

Using in HAML templates #672

Open
Open
@cernyjakub

Description

@cernyjakub

Hello!

I just migrated my Rails app to vite.js. I would like to integrate windicss. I have followed the docs and it kind of works.

I can use @apply in my stylesheets and I can use windi classes in HTML templates. However. I have mixed results in HAML templates - which I use in all my projects. I have added .haml extension to confing, so templates are scanned.

Apparently there are some issues with HAML syntax. I learned that using hash syntax for classes works:

%div{:class => 'my-nice-class other-class'}

But mixing with HAML dot notation (very common) causes troubles:

%div.my-nice-class.other-nice-class

The strange thing is, that sometimes it works, sometimes not. I am trying to find out what could be the source of troubles.. I though it was the dashes in class-names, but probably it is not..

I am using normal vite processing from vite_rails gem.

Is somebody using HAML with Windi? I fould some haml references in docs/examples, but technically it is not confirmed anywhere that it should work ;)

thanks in advance for any hints!
Jakub

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions