Skip to content

Commit

Permalink
feat: add col-end plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
arlyon committed Dec 1, 2022
1 parent 73291ca commit d874547
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions crates/tailwind-config/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ pub struct TailwindTheme<'a> {
pub grid_column: HashMap<&'a str, &'a str>,
#[serde(borrow, rename = "gridColumnStart")]
pub grid_column_start: HashMap<&'a str, &'a str>,
#[serde(borrow, rename = "gridColumnEnd")]
pub grid_column_end: HashMap<&'a str, &'a str>,

#[serde(borrow, rename = "transitionDelay")]
pub transition_delay: 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 @@ -710,6 +710,7 @@ pub fn white_space(
pub fn col(Value(rest): &Value, theme: &TailwindTheme) -> Option<ObjectLit> {
simple_lookup(&theme.grid_column, rest, "gridColumn").or_else(|| match rest.split_once('-') {
Some(("start", rest)) => simple_lookup(&theme.grid_column_start, rest, "gridColumnStart"),
Some(("end", rest)) => simple_lookup(&theme.grid_column_end, rest, "gridColumnEnd"),
_ => None,
})
}
Expand Down

0 comments on commit d874547

Please sign in to comment.