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

Add media-feature-range-notation: "context" rule #275

Closed
jeddy3 opened this issue Dec 1, 2022 · 5 comments · Fixed by #284
Closed

Add media-feature-range-notation: "context" rule #275

jeddy3 opened this issue Dec 1, 2022 · 5 comments · Fixed by #284
Labels
status: wip is being worked on by someone type: enhancement a new feature that isn't related to rules

Comments

@jeddy3
Copy link
Member

jeddy3 commented Dec 1, 2022

What is the problem you're trying to solve?

Consistent range media features.

What solution would you like to see?

Turn the media-feature-range-notation on.

We'll want to use the context primary option as it addresses sort comings with the older prefix approach. We'll need to wait until

  • it's supported in all evergreen browsers (waiting on Safari).
  • we add autofix for this option to the rule
@jeddy3 jeddy3 added the status: needs discussion triage needs further discussion label Dec 1, 2022
@ybiquitous
Copy link
Member

Safari 16.4 now supports it!

image

In addition, the autofix is coming soon.

@ybiquitous ybiquitous added type: enhancement a new feature that isn't related to rules status: ask to implement ask before implementing as may no longer be relevant and removed status: needs discussion triage needs further discussion labels Mar 29, 2023
@ybiquitous
Copy link
Member

The next version to include this addition should be a major update.

@ybiquitous ybiquitous added status: wip is being worked on by someone and removed status: ask to implement ask before implementing as may no longer be relevant labels Mar 30, 2023
mattxwang added a commit that referenced this issue Apr 1, 2023
@jdelStrother
Copy link

I was surprised this comes on by default when Safari 16.4 is only very recently available and has very low adoption so far. I'm not arguing to change the behaviour, would just love to hear more about the rationale - is the expectation that everyone should be using https://github.com/postcss/postcss-media-minmax to transpile it?

@ybiquitous
Copy link
Member

This feature is excellent for people, and they should be so happy when all modern browsers support it. So this added rule could be a good opportunity to inform them about the feature.

If people don't need it, they can turn the rule off. Or, they can transpile CSS code with the beautiful Postcss plugin you mentioned.

@Mister-Hope
Copy link

Mister-Hope commented May 4, 2023

This feature is excellent for people, and they should be so happy when all modern browsers support it. So this added rule could be a good opportunity to inform them about the feature.

If people don't need it, they can turn the rule off. Or, they can transpile CSS code with the beautiful Postcss plugin you mentioned.

Yes, I agree that you can add this in changelog with an h1, e.g.:

Welcome to turn on media-feature-range-notation

But I am surprised to see a rule like this being turned on so carelessly.

See the data from canIUse:

image

It has a low support rage of only <75%, and a one year old chrome even does not support it, and there are so many ios and macOS devices are not upgrading to 16.4 at all.

Also this feature is used to build reponsive layouts, which means that more than a quator people will see broken websites with this rule turn on, shall anyone feel that is affordable to any products or websites? @jdelStrother

I don't think this feature should be included at this point, as I think it's more common for any websites to provide at least one year backwords support for all browsers

Can we add some notes or commnunity standards, to unify in what case "A feature is already widely supported and can be turned on by default"? Especially the feature can not be pollyfilled by other tools at this time?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: wip is being worked on by someone type: enhancement a new feature that isn't related to rules
Development

Successfully merging a pull request may close this issue.

4 participants