pub fn parse_gradient(s: &str) -> Result<Gradient, String>Expand description
Parse a linear or radial gradient from a string
§Formats
linear-gradient(<angle>, <color-stop>, <color-stop>, ...)radial-gradient(<shape>, <color-stop>, <color-stop>, ...)
§Examples
use dampen_core::parser::gradient::parse_gradient;
let grad = parse_gradient("linear-gradient(90deg, red, blue)").unwrap();