gpt4 book ai didi

html - 仅使用大写字母的 CSS 或 SASS 选择器

转载 作者:太空宇宙 更新时间:2023-11-03 22:54:13 24 4
gpt4 key购买 nike

所以,我偶然发现了这样的事情:

SM\:BUTTON {
[some props];
}

而且我以前从未见过这样的事情。它有什么作用?

文件类型是.scss,显然也是SASS语法。但是,如果是这种情况,那么它也可以是纯 CSS。由于选择器选择了一个 Angular Directive(指令),即

<sm:button class="..."></sm:button>

我认为这可能与转义冒号有关,但我查了一下,发现 \: 已经成功了。所以,我在这里几乎一无所知。

最佳答案

标签、类和 ID 等 CSS 选择器通常区分大小写。 See the spec :

All Selectors syntax is case-insensitive within the ASCII range (i.e. [a-z] and [A-Z] are equivalent), except for parts that are not under the control of Selectors. The case sensitivity of document language element names, attribute names, and attribute values in selectors depends on the document language. For example, in HTML, element names are case-insensitive, but in XML, they are case-sensitive.

关于html - 仅使用大写字母的 CSS 或 SASS 选择器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38999927/

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