felixfbecker/vscode-css-stacking-contexts

disable/enable z-index error message with inline comment

dziku86 opened this issue · 2 comments

Allow to disable/enable z-index error message with inline comment.

Quoting extensions info message:
"This z-index declaration does likely not have any effect because the rule does not create a new stacking context."
Does likely not have any effect but sometimes it does and it will be really handy to exclude those selectors.

In those cases I think the best way to express that is to force a new stacking context with isolation: isolate, which is what the suggested autofix does. If the element already created a new stacking context through another selector, then that will just be a noop, but it will make the code clearer to readers and remove the warning. Does that make sense?

Thank you for quick answer. It does make sense but that is just useless code that bloats css file IMHO.