css - 为什么 sublime 3 黄色高亮 css 中的所有 ID 选择器?

标签 css sublimetext sublimetext3

一张图说一千个字:

Sublime 3(build3083)。它将所有 #something 选择器突出显示为黄色警告。 .classtag 否则一切正常。

我不经常处理 CSS,但这很烦人。
如何摆脱正确的黄色警告?

enter image description heres

另外,我没有安装很多包。不知道有没有问题。

{
    "in_process_packages":
    [
    ],
    "installed_packages":
    [
        "Alignment",
        "HighlightWords",
        "Laravel Blade Highlighter",
        "Package Control",
        "PhalconPHP Completions",
        "PhpDoc",
        "SFTP",
        "SideBarEnhancements",
        "SourceTree",
        "SublimeCodeIntel",
        "SublimeLinter",
        "SublimeLinter-csslint",
        "SublimeLinter-jshint",
        "SublimeLinter-php",
        "Theme - Cobalt2",
        "Volt"
    ]
}

最佳答案

正如@MattDMo 所指出的,csslint 只是将所有 ID 选择器视为警告。

https://github.com/CSSLint/csslint/wiki/Disallow-IDs-in-selectors

Rule ID: ids

This rule is aimed at improving maintainability by flagging the use of IDs in selectors. Every instance of an ID will result in a warning.

嗯,我觉得我有充分的理由在 CSS 中使用 ID 选择器。只需卸载 csslint。

关于css - 为什么 sublime 3 黄色高亮 css 中的所有 ID 选择器?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30283358/

相关文章:

regex - 从 word_separators 中删除了连字符,ctrl+d 不再有意义

ruby-on-rails - Sublime Text 3 中多行代码的语法突出显示问题(Ruby on Rails & Haml)

linux - 如何在 Git Bash 上初始化 bashrc

html - 边界的奇怪空间

javascript - 是否可以在 EMACS 中编写 HTML-withASP-withJavascript-withCSS ?

css - x 和 y 方向具有不同背景重复的多个背景

javascript - 检测 iPhone/iPad 并更改 CSS 文件

javascript - 正则表达式排除词

python - ModuleNotFoundError : No module named 'webdriver_manager' error even after installing webdrivermanager

sublimetext - 如何在 sublime text 的 markdown 中制作 "todo"?