tailwind-converter icon indicating copy to clipboard operation
tailwind-converter copied to clipboard

Incorrect Conversion of HTML <header> Tag in Tailwind Converter

Open matbrgz opened this issue 1 year ago • 0 comments

Issue Description: The Tailwind Converter project aims to facilitate the seamless transition from plain HTML/CSS to a single HTML file with Tailwind CSS classes. However, a critical bug has been identified in the conversion process specifically related to the <header> tag.

Bug Details: Currently, the <header> tag's conversion process is resulting in incorrect and unintended Tailwind CSS class assignments. For instance, the following code:

<header class="header header-transparent header-layout1">
... etc
</header>

Is being erroneously converted to:

<relative z-50 class="relative z-50 relative z-50-transparent relative z-50-layout1">
... etc
</relative z-50>

This incorrect conversion not only leads to a broken HTML structure but also generates inappropriate Tailwind CSS class combinations that have no functional or semantic relevance.

Expected Behavior: The expected behavior is for the <header> tag to be accurately converted into appropriate Tailwind CSS classes, adhering to the project's intended purpose and maintaining the correct HTML structure. The conversion should reflect the original classes specified for the <header> tag without introducing irrelevant or redundant classes.

Steps to Reproduce:

  1. Provide a sample HTML snippet containing a <header> tag with multiple classes.
  2. Run the current version of the Tailwind Converter on the provided HTML snippet.

Proposed Solution: To address this bug, it's crucial to review and rectify the conversion logic associated with the <header> tag. The Tailwind Converter should accurately translate the specified classes without introducing extraneous or conflicting classes.

matbrgz avatar Aug 11 '23 02:08 matbrgz