Skip to content

Emit error for deprecated media features #240

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

Merged
merged 1 commit into from
Feb 3, 2020

Conversation

sideshowbarker
Copy link
Member

@sideshowbarker sideshowbarker commented May 31, 2019

When the CSS3 profile is selected, this change causes an error to be emitted for the following deprecated media features: device-aspect-ratio, device-height, device-width — as well as for their corresponding min- and max- prefixed versions.

https://www.w3.org/TR/2017/CR-mediaqueries-4-20170905/#mf-deprecated states:

The following media features are deprecated. They kept for backward
compatibility, but are not appropriate for newly written style sheets.
Authors must not use them.

Otherwise, without this change, no messages (not even warnings) are reported for the (mis)use of those media features.

@sideshowbarker sideshowbarker force-pushed the sideshowbarker/deprecated-media-features-error branch from f83ef30 to f115eb9 Compare May 31, 2019 07:41
@ylafon
Copy link
Member

ylafon commented Sep 10, 2019

Should it be a warning, but as warnings are mostly ignored, I can understand why. Could there be another way to fix this duality?

@sideshowbarker
Copy link
Member Author

Should it be a warning, but as warnings are mostly ignored, I can understand why.

IMHO, it it should be an error — because the spec says “Authors must not use them”, with a “must”. (If the spec instead said “Authors should not use them”, then I would think a warning would be the right choice.)

When the CSS3 profile is selected, this change causes an error to be
emitted for the following deprecated media features:
device-aspect-ratio, device-height, device-width — as well as for their
corresponding min- and max- prefixed versions.

https://www.w3.org/TR/2017/CR-mediaqueries-4-20170905/#mf-deprecated
states:

> The following media features are deprecated. They kept for backward
> compatibility, but are not appropriate for newly written style sheets.
> Authors must not use them.

Otherwise, without this change, no messages (not even warnings) are
reported for the (mis)use of those media features.
@sideshowbarker sideshowbarker force-pushed the sideshowbarker/deprecated-media-features-error branch from f115eb9 to 514cb23 Compare November 28, 2019 09:57
@sideshowbarker
Copy link
Member Author

Rebased. I still do think this should be an error, not a warning — for the reason in #240 (comment) — because the spec says “Authors must not use them”, with a “must”. (If the spec instead said “Authors should not use them”, then I would think a warning would be the right choice.)

@ylafon ylafon merged commit ca1e5c3 into master Feb 3, 2020
@ylafon ylafon deleted the sideshowbarker/deprecated-media-features-error branch March 2, 2020 22:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants