Skip to content

Commit

Permalink
feat: add columns plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
timstarkk committed Feb 21, 2023
1 parent a94f818 commit 9d81033
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions crates/tailwind-config/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ pub struct TailwindTheme<'a> {
#[serde(borrow, rename = "zIndex")]
pub z_index: HashMap<&'a str, &'a str>,
#[serde(borrow)]
pub columns: HashMap<&'a str, &'a str>,
#[serde(borrow)]
pub translate: HashMap<&'a str, &'a str>,
#[serde(borrow)]
pub width: HashMap<&'a str, &'a str>,
Expand Down
1 change: 1 addition & 0 deletions crates/tailwind-parse/src/eval/plugin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ lookup_plugin_arbitrary!(mr, margin, "marginRight");
lookup_plugin_arbitrary!(mt, margin, "marginTop");
lookup_plugin_arbitrary!(mb, margin, "marginBottom");
lookup_plugin_arbitrary!(z, z_index, "zIndex");
lookup_plugin_arbitrary!(columns, columns, "columns");
lookup_plugin_arbitrary!(gap, gap, "gap");
lookup_plugin_arbitrary!(gap_x, gap, "columnGap");
lookup_plugin_arbitrary!(gap_y, gap, "rowGap");
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 @@ -208,6 +208,7 @@ impl<'a> Literal<'a> {
Leading => Required(plugin::leading),
Truncate => Singular(plugin::truncate),
Animate => Required(plugin::animation),
Columns => RequiredArbitrary(plugin::columns),
};

match (plugin, &self.value) {
Expand Down
2 changes: 1 addition & 1 deletion crates/tailwind-parse/src/plugin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ mod plugin {
Blur,
Ring,
Sr,

Columns,
Prose(Option<Prose>),
Not(Not),
}
Expand Down

0 comments on commit 9d81033

Please sign in to comment.