gpt4 book ai didi

csscomb 删除运动组之间的换行符

转载 作者:搜寻专家 更新时间:2023-11-01 00:06:30 25 4
gpt4 key购买 nike

我使用 csscomb.js 来组织我的 css。它工作得很好,除了我不希望在排序组之间有换行符。[见图]

有没有办法去除这些?我到处都看了。

enter image description here 示例

这是 mij 设置:

 "remove-empty-rulesets": false,
"always-semicolon": true,
"color-case": "lower",
"block-indent": " ",
"color-shorthand": false,
"element-case": "lower",
"leading-zero": true,
"quotes": "single",
"sort-order-fallback": "abc",
"space-before-colon": "",
"space-after-colon": " ",
"space-before-combinator": " ",
"space-after-combinator": " ",
"space-between-declarations": "\n",
"space-before-opening-brace": " ",
"space-after-opening-brace": "\n",
"space-after-selector-delimiter": "\n",
"space-before-selector-delimiter": "",
"space-before-closing-brace": "\n",
"strip-spaces": false,
"tab-size": true,
"unitless-zero": true,
"vendor-prefix-align": true,

最佳答案

对此没有选择,但这是我使用的解决方法。

像这样编辑名为 sort-order 的属性:

原文:

"sort-order": [
[
"font",
"font-family",
"font-size",
"font-weight",
"font-style",
"font-variant",
"font-size-adjust",
"font-stretch",
"font-effect",
"font-emphasize",
"font-emphasize-position",
"font-emphasize-style",
"font-smooth",
"line-height"
],
[
"position",
"z-index",
"top",
"right",
"bottom",
"left"
],
...

新:

    "sort-order": [
[
"font",
"font-family",
"font-size",
"font-weight",
"font-style",
"font-variant",
"font-size-adjust",
"font-stretch",
"font-effect",
"font-emphasize",
"font-emphasize-position",
"font-emphasize-style",
"font-smooth",
"line-height",
"position",
"z-index",
"top",
"right",
"bottom",
"left",
...
]
]

基本上您将这些组合并为一个组,因此不添加分隔线。以下是 Csscomb 创作者的官方回复:github.com/csscomb/csscomb.js/issues/314

关于csscomb 删除运动组之间的换行符,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36218068/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com