noDeprecatedMediaType
Ta treść nie jest jeszcze dostępna w Twoim języku.
Summary
Section titled “Summary”- Rule available since:
v2.3.14 - Diagnostic Category:
lint/nursery/noDeprecatedMediaType - This rule doesn’t have a fix.
- The default severity of this rule is information.
- Sources:
- Same as
media-type-no-deprecated
- Same as
How to configure
Section titled “How to configure”{ "linter": { "rules": { "nursery": { "noDeprecatedMediaType": "error" } } }}Description
Section titled “Description”Disallow deprecated media types.
Several media types defined in earlier specifications have been deprecated and should no longer be used. The deprecated media types are still recognized, but they match nothing.
For details on media types, see the Media Queries Level 5 specification.
Examples
Section titled “Examples”Invalid
Section titled “Invalid”@media tv {}code-block.css:1:8 lint/nursery/noDeprecatedMediaType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
ℹ Unexpected deprecated media type: tv
> 1 │ @media tv {}
│ ^^
2 │
ℹ Deprecated media types are recognized but match nothing; prefer using media features or recommended media types.
ℹ This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.
ℹ Recommended media types include:
- all
- print
- screen
@media handheld and (min-width: 480px) {}code-block.css:1:8 lint/nursery/noDeprecatedMediaType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
ℹ Unexpected deprecated media type: handheld
> 1 │ @media handheld and (min-width: 480px) {}
│ ^^^^^^^^
2 │
ℹ Deprecated media types are recognized but match nothing; prefer using media features or recommended media types.
ℹ This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.
ℹ Recommended media types include:
- all
- print
- screen
@media screen {}@media print and (min-resolution: 300dpi) {}Options
Section titled “Options”Media types to allow (case-insensitive).
{ "linter": { "rules": { "nursery": { "noDeprecatedMediaType": { "options": { "allow": [ "tv", "speech" ] } } } } }}@media tv {}@media speech {}Related links
Section titled “Related links”Copyright (c) 2023-present Biome Developers and Contributors.