Skip to content

HAML support#52

Description

@bb

I have a Rails project which is using HAML as HTML template syntax. I tried converting the contained Bootstrap CSS to Tailwind and it

TLDR about HAML: Instead of e.g. <span class="text-secondary"> the code is %span.text-secondary.
There are a few extra cases, e.g. if the tag name is div, it can be removed (e.g. <div class="d-none d-md-block"> becomes .d-none.d-md-block). IDs can also be included like h1#overview and there are quite a few more cases like attribute syntax (based on Ruby) which allows e.g. generating class names. For more, see the website.

Is there a way to get tailwindo to convert my files?
If not directly: Are there any recommendations how to proceed? E.g. there are tools to convert HAML to HTML (with ERB, which is similar to PHP in HTML and seems to work) and back... which might be included in the processing pipeline.

Furthermore (might be worth a separate issue, if the error is not on my side), the files are called e.g. application.html.haml and neither of the extensions haml, html nor html.haml found any files: tailwindo -e html,haml,html.haml while calling e.g. tailwindo application.html.haml directly works but only detects embedded HTML or SVG code.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions