Skip to content

Commit

Permalink
feat: add content plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
arlyon committed Dec 5, 2022
1 parent 7e44200 commit 687f5a2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions crates/tailwind-parse/src/eval/plugin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -759,6 +759,10 @@ pub fn row(Value(rest): &Value, theme: &TailwindTheme) -> Option<ObjectLit> {
})
}

pub fn content(rest: &SubjectValue, _theme: &TailwindTheme) -> Option<ObjectLit> {
Some(to_lit(&[("content", rest.as_str())]))
}

pub fn justify(Value(rest): &Value, _theme: &TailwindTheme) -> Option<ObjectLit> {
match *rest {
"start" => Some("flex-start"),
Expand Down
1 change: 1 addition & 0 deletions crates/tailwind-parse/src/literal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ impl<'a> Literal<'a> {
Outline => Optional(plugin::outline),
Mix => Required(plugin::mix),
Col => Required(plugin::col),
Content => RequiredArbitrary(plugin::content),
Row => Required(plugin::row),
Grow => Optional(plugin::grow),
Shrink => Optional(plugin::shrink),
Expand Down
1 change: 1 addition & 0 deletions crates/tailwind-parse/src/plugin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ mod plugin {
#[rename("align")]
VerticalAlign,
Pb,
Content,
M,
Mx,
My,
Expand Down

0 comments on commit 687f5a2

Please sign in to comment.