首页 > 解决方案 > 在 Visual Studio Code 中更改匹配标签的文本装饰样式

问题描述

我更改了 Visual Studio Code 的highlight-matching-tag扩展中的设置,为 html 中的开始和结束标签添加下划线,如下所示:

"highlight-matching-tag.style": {
        "textDecoration": "underline"
    }

这是结果。该样式将应用于整个开始标签及其所有属性。

是否可以像在 Atom 编辑器中那样将样式更改为仅对开始标签而不是其属性进行下划线?

这是我试图完成 的结果。

标签: htmlcssvisual-studio-codeatom-editor

解决方案


这将实现您想要的:

   "highlight-matching-tag.styles": {
        "opening": {
            "name": {
                "underline": "#8854d0",
            }
        },
        "closing": {
            "name": {
                "underline": "#8854d0"
            }
        }
    },

推荐阅读