heybourn / headwind

An opinionated Tailwind CSS class sorter built for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=heybourn.headwind
MIT License
1.38k stars 45 forks source link

not sorting when using arbitrary value classes #200

Closed sina-salahshour closed 1 year ago

sina-salahshour commented 1 year ago

Describe the bug When class names include some arbitrary value class, they are not being sorted.

To Reproduce Steps to reproduce the behavior:

  1. create a svelte project
  2. add a class like w-[41px]
  3. try to sort by either format/saving or extension sort command.

Expected behavior classes to be sorted

example

// cell.svelte
<script lnag="ts">
    let enabled = false;
</script>

<button
    class="w-4 bg-black data-[active=true]:bg-white h-4"
    data-active={enabled}
    on:click={() => {
        enabled = !enabled;
    }}
/>

when i remove the data-[active=true]:bg-white class, it works.

Desktop (please complete the following information):

james0r commented 1 year ago

This could be confused with what Headwind calls a custom class: a class that you create for your own styling or otherwise versus w-[41px] which would be a Tailwind arbitrary value class.

sina-salahshour commented 1 year ago

This could be confused with what Headwind calls a custom class: a class that you create for your own styling or otherwise versus w-[41px] which would be a Tailwind arbitrary value class.

ok then let me edit my issue

arthurmchr commented 1 year ago

Same as https://github.com/heybourn/headwind/issues/183

sina-salahshour commented 1 year ago

Same as #183

So I'm closing this issue in favor of https://github.com/heybourn/headwind/issues/183