• 请不要在回答技术问题时复制粘贴 AI 生成的内容
cnobody233
V2EX  ›  程序员

请教 unocss 类名排序的问题

  •  
  •   cnobody233 · Oct 30, 2023 · 2073 views
    This topic created in 949 days ago, the information mentioned may be changed or developed.
    Unocss 现在写起来虽然挺爽,但是 className 真的是又臭又长。

    官方虽然有排序规则,但是好像和 tailwind 的插件 prettier-plugin-tailwindcss 规则不一样,好像是通过字母顺序去进行排序的。

    有相关插件能保持和 prettier-plugin-tailwindcss 规则一样嘛。

    或者有没有其他的解决方案呢 🤔
    2 replies    2023-10-31 09:03:41 +08:00
    ourongxing
        1
    ourongxing  
       Oct 30, 2023
    去 github 提 issue 啊,在这里问有什么用。以及这个问题已经有人提了 https://github.com/unocss/unocss/issues/1825
    sechi
        2
    sechi  
       Oct 31, 2023
    个人感觉用 attributify + 换行就足够清晰了
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2971 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 37ms · UTC 04:15 · PVG 12:15 · LAX 21:15 · JFK 00:15
    ♥ Do have faith in what you're doing.