implement addition between num + bool
This commit is contained in:
parent
9103a1d0d8
commit
23390238b9
@ -60,6 +60,10 @@ impl Value {
|
|||||||
format!("{}{}{}", num, unit, other.to_css_string(span)?),
|
format!("{}{}{}", num, unit, other.to_css_string(span)?),
|
||||||
QuoteKind::None,
|
QuoteKind::None,
|
||||||
),
|
),
|
||||||
|
Self::True | Self::False => Self::Ident(
|
||||||
|
format!("{}{}{}", num, unit, other.to_css_string(span)?),
|
||||||
|
QuoteKind::None,
|
||||||
|
),
|
||||||
_ => {
|
_ => {
|
||||||
return Err((
|
return Err((
|
||||||
format!(
|
format!(
|
||||||
|
@ -253,3 +253,13 @@ test!(
|
|||||||
"a {\n color: foo + #fff;\n}\n",
|
"a {\n color: foo + #fff;\n}\n",
|
||||||
"a {\n color: foo#fff;\n}\n"
|
"a {\n color: foo#fff;\n}\n"
|
||||||
);
|
);
|
||||||
|
test!(
|
||||||
|
num_plus_true,
|
||||||
|
"a {\n color: 1 + true;\n}\n",
|
||||||
|
"a {\n color: 1true;\n}\n"
|
||||||
|
);
|
||||||
|
test!(
|
||||||
|
num_plus_false,
|
||||||
|
"a {\n color: 1 + false;\n}\n",
|
||||||
|
"a {\n color: 1false;\n}\n"
|
||||||
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user