Struct tailwind_parse::Literal
source · pub struct Literal<'a> {
pub cmd: Plugin,
pub value: Option<SubjectValue<'a>>,
pub span: Option<Span>,
}Expand description
The core ‘rule’ of a tailwind directive.
Example: text-2xl is a Plugin with a value of 2xl.
Fields§
§cmd: Plugin§value: Option<SubjectValue<'a>>§span: Option<Span>Implementations§
source§impl<'a> Literal<'a>
impl<'a> Literal<'a>
sourcepub fn to_object_lit(
self,
_span: Span,
theme: &'a TailwindTheme<'_>
) -> Result<ObjectLit, LiteralConversionError<'a>>
pub fn to_object_lit(
self,
_span: Span,
theme: &'a TailwindTheme<'_>
) -> Result<ObjectLit, LiteralConversionError<'a>>
Takes the combination of a plugin and a value and converts it into a javascript object literal with the equivalent css.