Enum tailwind_parse::Plugin
source · pub enum Plugin {
Show 96 variants
Position(Position),
Visibility(Visibility),
Display(Display),
TextTransform(TextTransform),
TextDecoration(TextDecoration),
Border(Option<Border>),
Rounded(Option<Rounded>),
Min(Min),
Max(Max),
List(List),
H,
W,
P,
Px,
Pl,
Auto(Auto),
Pr,
LineClamp,
Py,
Pt,
VerticalAlign,
Pb,
Content,
M,
Mx,
My,
Ml,
Backdrop(Backdrop),
Stroke,
Mr,
Mt,
TransformOrigin,
Mb,
Z,
Text,
Bg,
Font,
Fill,
Shadow,
Transition,
Placeholder,
Inset(Option<Inset>),
Delay,
Snap(Snap),
Duration,
Divide(Option<Divide>),
Rotate,
Appearance,
Truncate,
Animate,
Pointer,
Aspect,
Ease,
Order,
Whitespace(Whitespace),
From,
To,
Outline,
Mix,
Flex(Option<Flex>),
Grid(Option<Grid>),
Col(Option<Col>),
Row(Option<Row>),
Float,
Grow,
Shrink,
Basis,
Object(Object),
Justify,
Items,
Leading,
Gap(Option<Gap>),
Cursor,
Antialiased,
Scroll(Scroll),
Scale,
Box,
Select,
Overflow(Option<Overflow>),
Top,
Bottom,
Left,
Right,
AlignSelf(AlignSelf),
Translate(Translate),
Tracking,
Invert,
Space,
Transform,
Opacity,
Italic,
Blur,
Ring,
Sr,
Prose(Option<Prose>),
Not(Not),
}
Expand description
The plugin represents the core command the tailwind parser is
looking for. For example, the text
plugin is represented by
the Text
variant.
Variants§
Position(Position)
Transparent plugins do not add to the class name.
Example: ‘sticky’, ‘static’, ‘fixed’
Visibility(Visibility)
Display(Display)
TextTransform(TextTransform)
TextDecoration(TextDecoration)
Border(Option<Border>)
Border has an optional sub-item
Example: ‘border’, ‘border-t’, ‘border-b’, ‘border-l’, ‘border-r’
Rounded(Option<Rounded>)
Min(Min)
Max(Max)
List(List)
H
W
P
Px
Pl
Auto(Auto)
Pr
LineClamp
Py
Pt
VerticalAlign
Pb
Content
M
Mx
My
Ml
Backdrop(Backdrop)
Stroke
Mr
Mt
TransformOrigin
Mb
Z
Text
Bg
Font
Fill
Shadow
Transition
Placeholder
Inset(Option<Inset>)
Delay
Snap(Snap)
Duration
Divide(Option<Divide>)
Rotate
Appearance
Truncate
Animate
Pointer
Aspect
Ease
Order
Whitespace(Whitespace)
From
To
Outline
Mix
Flex(Option<Flex>)
Grid(Option<Grid>)
Col(Option<Col>)
Row(Option<Row>)
Float
Grow
Shrink
Basis
Object(Object)
Justify
Items
Leading
Gap(Option<Gap>)
Cursor
Antialiased
Scroll(Scroll)
Scale
Box
Select
Overflow(Option<Overflow>)
Top
Bottom
Left
Right
AlignSelf(AlignSelf)
Translate(Translate)
Tracking
Invert
Space
Transform
Opacity
Italic
Blur
Ring
Sr
Prose(Option<Prose>)
Not(Not)
Implementations§
source§impl<'a> Plugin
impl<'a> Plugin
sourcepub fn parse(s: NomSpan<'a>) -> IResult<NomSpan<'a>, Self, Error<NomSpan<'a>>>
pub fn parse(s: NomSpan<'a>) -> IResult<NomSpan<'a>, Self, Error<NomSpan<'a>>>
At a hight level, this algorithm:
- take a segment of the input
- if it has a sub-segment, attempt to parse a plugin from the two
- if it doesn’t have a sub-segment, attempt to parse a plugin from the segment
- if that plugin has subcommands, attempt to parse a subcommand from the sub-segment
this code is ugly