Deprecation
public enum Deprecation: Hashable, Sendable, CustomStringConvertible
A Deprecation
refers to a specific feature of the Sass compiler that is deprecated or planned to
become deprecated.
By default, using a deprecated feature causes a warning – that is, a CompilerMessage
with
type CompilerMessage.Kind.deprecation
. In some future release of the compiler,
use of the deprecated feature will cause an error instead.
You can customize a Sass Compiler
’s treatment of deprecated behaviours using a DeprecationControl
to create the compiler instance. Each individual deprecation can be ignored or promoted to an error. You can also
opt in to future deprecations – features that do not currently cause a deprecation warning but are planned to do
so in an upcoming release of Dart Sass.
Topics
Kinds
case id(ID)
case id(ID)
A specific Sass deprecation. See the Sass docs for a description of what each of these means.
Declaration
case id(ID)
case custom(String)
case custom(String)
case version(String)
case version(String)
A version number for the Sass compiler meaning “every deprecation known to this level of the compiler”.
This may not be supported for all facets of DeprecationControl
– the Dart Sass compiler supports
it only for fatal
deprecations.
Declaration
case version(String)
Deprecation IDs
enum ID
enum ID
The set of known deprecation IDs. See the Sass docs.
Declaration
Serialization
init(String)
init(String)
Create a Deprecation
from a string, guessing at the type from its format.
Declaration
public init(_ string: String)
var description: String
var description: String