diff --git a/src/builtin/color.rs b/src/builtin/color.rs index cccc478..225f859 100644 --- a/src/builtin/color.rs +++ b/src/builtin/color.rs @@ -40,7 +40,8 @@ pub(crate) fn register(f: &mut BTreeMap) { decl!(f "hsl", |args, _| { let hue = match arg!(args, 0, "hue").clone().eval() { Value::Dimension(n, Unit::None) - | Value::Dimension(n, Unit::Percent) => n, + | Value::Dimension(n, Unit::Percent) + | Value::Dimension(n, Unit::Deg) => n, _ => todo!("expected either unitless or % number for alpha"), }; let saturation = match arg!(args, 1, "saturation").clone().eval() { @@ -58,7 +59,8 @@ pub(crate) fn register(f: &mut BTreeMap) { decl!(f "hsla", |args, _| { let hue = match arg!(args, 0, "hue").clone().eval() { Value::Dimension(n, Unit::None) - | Value::Dimension(n, Unit::Percent) => n, + | Value::Dimension(n, Unit::Percent) + | Value::Dimension(n, Unit::Deg) => n, _ => todo!("expected either unitless or % number for alpha"), }; let saturation = match arg!(args, 1, "saturation").clone().eval() {