VS Code智能感知涵盖了一些CSS属性。

huangapple go评论72阅读模式
英文:

VS Code intellisense crossing some CSS properties

问题

看看 grid-row-gap 属性:

为什么VS Code显示一些元素带有一个十字,比如这张图片中的 grid-row-gap?我必须使用它,但它的效果不会显示。

我想使用 grid-row-gapgrid-column-gap 属性,但我不能。

英文:

Look at the grid-row-gap property:

<a href="https://i.stack.imgur.com/szM1f.png"><img src="https://i.stack.imgur.com/szM1f.png"></a>

Why does VS Code show some elements with a cross, like grid-row-gap in this image? I have to use it, but its effects won't show.

I want to use the properties grid-row-gap and grid-column-gap, but I can't.

答案1

得分: 2

被划掉表示 - 从上下文来看 - 不再使用该属性。

grid-row-gap的情况下,这是因为现在已经删除了属性名上的grid前缀,以允许相同的属性与CSS flexbox布局一起使用,而不需要等效的flex-row-gap。话虽如此:

旧名称: 等效:
grid-column-gap row-gap
grid-row-gap column-gap

顺便说一下,如果您将该选项输入到文档中,然后将鼠标悬停在上面,您将看到以下消息:

属性已过时。请避免使用。

指定网格行之间的间距。已被'row-gap'属性替代。

(Firefox 52, Chrome 57, Safari 10, Opera 44)

英文:

Being crossed out indicates &ndash; from context &ndash; that the property is no longer to be used.

In the case of grid-row-gap this is because the property-name now has the grid prefix removed, in order to allow the same property to be used with CSS flexbox layout, instead of necessitating a flex-row-gap equivalent. That being said:

old name: equivalent:
grid-column-gap row-gap
grid-row-gap column-gap

Incidentally, if you'd entered that option into the document, and then hovered over it, you would have seen the message:

> Property is obsolete. Avoid using it.
>
> Specifies the gutters between grid rows. Replaced by 'row-gap' property.
>
>(Firefox 52, Chrome 57, Safari 10, Opera 44)

huangapple
  • 本文由 发表于 2023年5月30日 00:15:37
  • 转载请务必保留本文链接:https://go.coder-hub.com/76358848.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定