为了不更好地支持Flexbox Grid,请不要在WebStorm中格式化CSS新的中断线

问题描述 投票:0回答:1

是否有一种不格式化CSS换行符WebStorm的方法?由于使用Flex Grid可以更好地处理多行...

例如,这是我喜欢保留的方式:

@media (max-width: 1200px) {
  .cardInner {
    grid-template-areas:
      "header"
      "sideA"
      "sideB"
      "sideC"
      "sideD" !important;
    grid-template-columns: 99% 1%!important;
    grid-template-rows: repeat(5, 45px) !important;
  }
  .justifyToStart {
    justify-self: normal !important;
  }

  .justifyToEnd {
    justify-self: normal !important;
  }
}

.cardInner {
  display: grid;
  //justify-content: end;
  //justify-items: end;
  grid-template-areas:
    "header header"
    "sideA sideB"
    "sideC sideD";

但是cont-alt-L会删除我的Grid空间,这是使用Flex-Grid使CSS保持粒状化的便捷方法。

Sean

css intellij-idea flexbox webstorm
1个回答
0
投票
您可以在这里使用格式标记:

  • in

    设置|编辑器代码样式|格式化程序控件,勾选在注释中启用格式化程序标记复选框

  • 用格式化字符注释包围代码:

.grid { display: grid; /*@formatter:off*/ grid-template-areas: "header header header" "sidebar content right" "footer footer footer" /*@formatter:on*/ }

我们有一项功能要求,为网格布局属性WEB-10013提供特殊格式;请关注它进行更新
© www.soinside.com 2019 - 2024. All rights reserved.