Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better partial support checks #160

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

RJWadley
Copy link
Contributor

@RJWadley RJWadley commented May 27, 2023

This pull request improves checking for partially supported properties by using MDN to check if the specific value we're using is unsupported or not.

For example, appearance: auto got support in chrome 83, so it would warn with chrome 81 but not with chrome 83. Meanwhile, appearance: none gained support much earlier, so it wouldn't warn with either 83 or 81.

As of right now it only checks declaration value pairs. the behavior is unchanged for other types of css features

details

MDN isn't part of feature detection, which remains unchanged. This is focused on providing better messages to the end user instead. Whenever partial support is detected, we then get more information from MDN to determine if we need to report the issue at all, and report with a more specific message if needed.

One thing to consider is that MDN adds a lot of weight (something like 10MB). This isn't a big issue for most environments, but it may matter for some. For example, if someone wanted to use this in the browser (why would they?) it would be much too large. If we think this is a problem we could gate this behind an option and import the data dynamically.

Closes

fixes #70
fixes #71
fixes #106
fixes #146

@RJWadley RJWadley marked this pull request as ready for review May 27, 2023 22:44
@RJWadley RJWadley marked this pull request as draft June 8, 2023 18:49
@RJWadley RJWadley force-pushed the check-partial-support branch 2 times, most recently from 17975bb to f6eec04 Compare June 8, 2023 19:01
@RJWadley RJWadley marked this pull request as ready for review June 8, 2023 19:27
@clshortfuse clshortfuse added this to the 6.1 milestone Jul 3, 2023
@clshortfuse
Copy link
Collaborator

I added this to a 6.1 milestone, since I would like to get 6.0 out as fast as possible. I would like to use some benchmarks to see the performance costs before adding in MDN.

@gian1200
Copy link

Any update on this?

Looks like it also close #83, #166 and #167

@kkmuffme
Copy link

kkmuffme commented Jan 1, 2024

Any update/what's pending for this to get merged?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment