atom / language-css

CSS package for Atom
Other
59 stars 84 forks source link

Do not mark min-device-width as `invalid.deprecated` #163

Closed octref closed 4 years ago

octref commented 4 years ago

Prerequisites

Description

For below CSS code:

@media (min-device-width: 100px) {}

min-device-width is marked as invalid.deprecated.media.css. Although Atom is already on tree-sitter and it doesn't mark it as invalid.deprecated, other editors such as VS Code does. This causes an unpleasant highlighting:

image

Sublime's documentation also states:

image

I suggest making the scope support.type.property-name.media.css, as people might be working with older language. This also makes it consistent with tree-sitter's CSS grammar as it doesn't mark it as invalid/deprecated:

image

I can work on a PR if that change is fine for you, @maxbrunsfeld and @rsese.

Additional Information

Originally posted at https://github.com/microsoft/vscode/issues/62515

rsese commented 4 years ago

Thanks @octref :+1: We'll share this with the other maintainers and see what they think.

lee-dohm commented 4 years ago

@octref Yep, a PR for this would be great!

octref commented 4 years ago

The PR is at https://github.com/atom/language-css/pull/165. @rsese should I ask someone to review, or should I review it myself 😅