Deprecation enum

A deprecated feature in the language.



Deprecation(String id, {required String? deprecatedIn, String? description})
Constructs a regular deprecation.
Deprecation.future(String id, {String? description})
Constructs a future deprecation.


callString → const Deprecation

Deprecation for passing a string to call instead of get-function.

Deprecation('call-string', deprecatedIn: '0.0.0', description: 'Passing a string directly to')
elseif → const Deprecation

Deprecation for @elseif.

Deprecation('elseif', deprecatedIn: '1.3.2', description: '@elseif.')
mozDocument → const Deprecation

Deprecation for parsing @-moz-document.

Deprecation('moz-document', deprecatedIn: '1.7.2', description: '@-moz-document.')
relativeCanonical → const Deprecation

Deprecation for importers using relative canonical URLs.

Deprecation('relative-canonical', deprecatedIn: '1.14.2')
newGlobal → const Deprecation

Deprecation for declaring new variables with !global.

Deprecation('new-global', deprecatedIn: '1.17.2', description: 'Declaring new variables with !global.')
colorModuleCompat → const Deprecation

Deprecation for certain functions in the color module matching the behavior of their global counterparts for compatiblity reasons.

Deprecation('color-module-compat', deprecatedIn: '1.23.0', description: 'Using color module functions in place of plain CSS functions.')
slashDiv → const Deprecation

Deprecation for treating / as division.

Deprecation('slash-div', deprecatedIn: '1.33.0', description: '/ operator for division.')
bogusCombinators → const Deprecation

Deprecation for leading, trailing, and repeated combinators.

Deprecation('bogus-combinators', deprecatedIn: '1.54.0', description: 'Leading, trailing, and repeated combinators.')
strictUnary → const Deprecation

Deprecation for ambiguous + and - operators.

Deprecation('strict-unary', deprecatedIn: '1.55.0', description: 'Ambiguous + and - operators.')
functionUnits → const Deprecation

Deprecation for passing invalid units to certain built-in functions.

Deprecation('function-units', deprecatedIn: '1.56.0', description: 'Passing invalid units to built-in functions.')
absPercent → const Deprecation

Deprecation for passing percentages to the Sass abs() function.

Deprecation('abs-percent', deprecatedIn: '1.65.0', description: 'Passing percentages to the Sass abs() function.')
duplicateVariableFlags → const Deprecation
Deprecation('duplicate-var-flags', deprecatedIn: '1.62.0', description: 'Using !default or !global multiple times for one variable.')
nullAlpha → const Deprecation
Deprecation('null-alpha', deprecatedIn: '1.62.3', description: 'Passing null as alpha in the ${isJS ? 'JS' : 'Dart'} API.')
calcInterp → const Deprecation
Deprecation('calc-interp', deprecatedIn: '1.67.0', description: 'Using interpolation in a calculation outside a value ' 'position.')
import → const Deprecation

Deprecation for @import rules.

Deprecation.future('import', description: '@import rules.')
userAuthored → const Deprecation

Used for deprecations coming from user-authored code.

Deprecation('user-authored', deprecatedIn: null)


deprecatedIn → Version?
The Dart Sass version this feature was first deprecated in.
description String?
A description of this deprecation that will be displayed in the CLI usage.
hashCode int
The hash code for this object.
id String
A unique ID for this deprecation in kebab case.
index int
A numeric identifier for the enumerated value.
isFuture bool
Whether this deprecation will occur in the future.
runtimeType Type
A representation of the runtime type of the object.


noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
toString() String
A string representation of this object.


operator ==(Object other) bool
The equality operator.

Static Methods

forVersion(Version version) Set<Deprecation>
Returns the set of all deprecations done in or before version.
fromId(String id) Deprecation?
Returns the deprecation with a given ID, or null if none exists.


values → const List<Deprecation>
A constant List of the values in this enum, in order of their declaration.
[callString, elseif, mozDocument, relativeCanonical, newGlobal, colorModuleCompat, slashDiv, bogusCombinators, strictUnary, functionUnits, absPercent, duplicateVariableFlags, nullAlpha, calcInterp, im…