Skip to content

Commit

Permalink
feat: svg
Browse files Browse the repository at this point in the history
  • Loading branch information
ifiokjr committed Apr 25, 2023
1 parent 29f57bd commit 9729025
Show file tree
Hide file tree
Showing 6 changed files with 1,136 additions and 217 deletions.
17 changes: 17 additions & 0 deletions crates/skribble_preset/src/data/atoms.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1002,6 +1002,23 @@ lazy_static! {
.values(vec!["justify-items", "auto"])
.styles(indexmap! { "place-self" => none })
.build(),

// Svg
Atom::builder()
.name("fill")
.values(LinkedValues::Color)
.styles(indexmap! { "fill" => none })
.build(),
Atom::builder()
.name("stroke")
.values(LinkedValues::Color)
.styles(indexmap! { "stroke" => none })
.build(),
Atom::builder()
.name("stroke-width")
.values(vec!["stroke-width"])
.styles(indexmap! { "stroke-width" => none })
.build(),
]
};
}
27 changes: 27 additions & 0 deletions crates/skribble_preset/src/data/named_classes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,33 @@ lazy_static! {
.name("space-y-reverse")
.styles(indexmap! { space_y_reverse => "1" })
.build(),
NamedClass::builder()
.name("sr-only")
.styles(indexmap! {
"position" => "absolute",
"width" => "1px",
"height" => "1px",
"padding" => "0",
"margin" => "-1px",
"overflow" => "hidden",
"clip" => "rect(0, 0, 0, 0)",
"white-space" => "nowrap",
"border-width" => "0",
})
.build(),
NamedClass::builder()
.name("sr-exclude")
.styles(indexmap! {
"position" => "static",
"width" => "auto",
"height" => "auto",
"padding" => "0",
"margin" => "0",
"overflow" => "visible",
"clip" => "auto",
"white-space" => "normal",
})
.build(),
]
};
}
10 changes: 10 additions & 0 deletions crates/skribble_preset/src/data/value_sets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1063,6 +1063,16 @@ lazy_static! {
"stretch" => "stretch",
})
.build(),
ValueSet::builder()
.name("stroke-width")
.values(indexmap! {
"0" => "0",
"1" => "1",
"2" => "2",
"3" => "3",
"4" => "4",
})
.build(),
]
};
}

0 comments on commit 9729025

Please sign in to comment.