diff --git a/src/value/parse.rs b/src/value/parse.rs index 5b2ca2f..34f2f73 100644 --- a/src/value/parse.rs +++ b/src/value/parse.rs @@ -722,11 +722,8 @@ impl Value { }) } '#' => { - if let Ok(s) = eat_ident(toks, scope, super_selector) { - IntermediateValue::Value(Spanned { - node: Value::Ident(s.node, QuoteKind::None), - span: s.span, - }) + if let Ok(s) = Self::ident(toks, scope, super_selector) { + s } else { IntermediateValue::Value(match parse_hex(toks, scope, super_selector, span) { Ok(v) => v, diff --git a/tests/interpolation.rs b/tests/interpolation.rs index 7e0ebcb..15bd94c 100644 --- a/tests/interpolation.rs +++ b/tests/interpolation.rs @@ -68,3 +68,8 @@ test!( "a {\n color: \"#{\\\"\\'}\";\n}\n", "a {\n color: \"\\\\\\\"\\\\'\";\n}\n" ); +test!( + interpolated_plain_css_fn, + "$f: foo;\na {\n color: #{$f}(a, 1+2, c);\n}\n", + "a {\n color: foo(a, 3, c);\n}\n" +);