【问题标题】:Prevent wrapping inline CSS lines in VS Code防止在 VS Code 中包装内联 CSS 行
【发布时间】:2022-01-19 09:00:09
【问题描述】:

我一直在使用tailwind,并且开始对VS Code 将类名包装为每行一个而感到恼火。这就是我的意思

                        <div
                          class="
                            absolute
                            inset-y-0
                            right-0
                            pr-3
                            flex
                            items-center
                            pointer-events-none
                          "
                        >

它确实更具可读性,但即使是短的 sn-ps 滚动也会变得难以置信的长。我尝试了 VScode 中的每一个设置,(设置 > Html > 格式)无济于事。如果我剪切“项目”以项目中心结尾的内容,则该特定 div 不会换行。如果可能的话,我真的很想增加限制。

【问题讨论】:

  • 如果以下答案解决了您的问题,请将其标记为已接受并点赞。

标签: html css visual-studio-code vscode-settings tailwind-css


【解决方案1】:

您需要将它们重新组合在一起,然后使用 VS code extinsion 称为:beautify 作为您的代码。

【讨论】:

    【解决方案2】:

    尝试一些扩展,例如 Beautify 和 Prettier。

    我个人使用 Prettier。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2010-09-20
      • 2020-07-01
      • 2020-08-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-11-06
      相关资源
      最近更新 更多