pub enum Item {
Show 26 variants
Import(Vec<SassString>, Value, SourcePos),
VariableDeclaration(VariableDeclaration),
AtRoot(Selectors, Vec<Item>),
AtMedia {
args: Value,
body: Option<Vec<Item>>,
pos: SourcePos,
},
AtRule {
name: SassString,
args: Value,
body: Option<Vec<Item>>,
pos: SourcePos,
},
Debug(Value),
Warn(Value),
Error(Value, SourcePos),
MixinDeclaration(String, Callable),
MixinCall(String, CallArgs, Option<Callable>, SourcePos),
Content(CallArgs, SourcePos),
FunctionDeclaration(String, Callable),
Return(Value, SourcePos),
IfStatement(Value, Vec<Item>, Vec<Item>),
Each(Vec<Name>, Value, Vec<Item>),
For {
name: Name,
from: Box<Value>,
to: Box<Value>,
inclusive: bool,
body: Vec<Item>,
},
While(Value, Vec<Item>),
Use(SassString, UseAs, Vec<(Name, Value, bool)>, SourcePos),
Forward(SassString, UseAs, Expose, Vec<(Name, Value, bool)>, SourcePos),
Extend(Selectors),
Rule(Selectors, Vec<Item>),
NamespaceRule(SassString, Value, Vec<Item>),
Property(SassString, Value, SourcePos),
CustomProperty(SassString, SassString),
Comment(SassString),
None,
}
Expand description
Every sass file is a sequence of sass items. Scoping items contains further sequences of items.
Variants§
Import(Vec<SassString>, Value, SourcePos)
An @import
directive.
VariableDeclaration(VariableDeclaration)
A variable declaration.
AtRoot(Selectors, Vec<Item>)
An @at-root
directive.
AtMedia
Fields
An @media
directive.
AtRule
Fields
name: SassString
The name of this directive
A generic @
directive.
Debug(Value)
An @debug
directive.
Warn(Value)
An @warn
directive.
Error(Value, SourcePos)
An @error
directive.
MixinDeclaration(String, Callable)
A @mixin
directive, declaring a mixin.
MixinCall(String, CallArgs, Option<Callable>, SourcePos)
An @include
directive, calling a mixin.
Content(CallArgs, SourcePos)
An @content
directive (in a mixin declaration).
FunctionDeclaration(String, Callable)
An @function
declaration.
Return(Value, SourcePos)
An @return
statement in a function declaration.
IfStatement(Value, Vec<Item>, Vec<Item>)
An @if
conditional directive.
Each(Vec<Name>, Value, Vec<Item>)
An @each
loop directive.
The value may be or evaluate to a list.
For
Fields
An @for
loop directive.
While(Value, Vec<Item>)
An @while
loop directive.
Use(SassString, UseAs, Vec<(Name, Value, bool)>, SourcePos)
An @use
directive.
Forward(SassString, UseAs, Expose, Vec<(Name, Value, bool)>, SourcePos)
An @forward
directive.
Extend(Selectors)
Extend rule (not really supported yet).
Rule(Selectors, Vec<Item>)
A sass rule; selectors followed by a block of items.
NamespaceRule(SassString, Value, Vec<Item>)
A sass namespace rule; a name followed by a block of properties.
Property(SassString, Value, SourcePos)
A sass property; a name and a value. The position is the full value.
CustomProperty(SassString, SassString)
A custom property.
Comment(SassString)
A comment (that might be preserved for the output).
None
Nothing
Trait Implementations§
source§impl From<VariableDeclaration> for Item
impl From<VariableDeclaration> for Item
source§fn from(value: VariableDeclaration) -> Self
fn from(value: VariableDeclaration) -> Self
source§impl PartialEq for Item
impl PartialEq for Item
source§impl PartialOrd for Item
impl PartialOrd for Item
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read more