Skip to content

Commit

Permalink
fix: port flex-grow to the new plugin structure
Browse files Browse the repository at this point in the history
  • Loading branch information
arlyon committed Nov 5, 2022
1 parent 92168da commit 8635bcc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions crates/tailwind-parse/src/eval/plugin.rs
Expand Up @@ -430,6 +430,13 @@ pub fn flex(
(Some(Flex::WrapReverse), _) => [("flexWrap", "wrap-reverse")],
(Some(Flex::NoWrap), _) => [("flexWrap", "nowrap")],
(None, None) => [("display", "flex")],
(Some(Flex::Grow), val) => {
return simple_lookup(
&theme.flex_grow,
val.as_ref().map(|v| v.as_str()).unwrap_or("DEFAULT"),
"flexGrow",
)
}
(None, Some(val)) => return simple_lookup(&theme.flex, val.as_str(), "flex"),
};

Expand Down
1 change: 1 addition & 0 deletions crates/tailwind-parse/src/plugin.rs
Expand Up @@ -187,6 +187,7 @@ mod plugin {
pub enum Flex {
Row,
Col,
Grow,
RowReverse,
ColReverse,
Wrap,
Expand Down

0 comments on commit 8635bcc

Please sign in to comment.