1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
//! The CSS `if()` function.
//!
//! CSS Values 5 gives `if()` a `;`-separated list of `condition: value`
//! branches, which is a different shape from the Sass ternary
//! `if($condition, $if-true, $if-false)` that shares the name. The two coexist:
//! a colon after the first clause selects this form, commas select the ternary.
//!
//! A condition is a boolean expression whose leaves are either `sass(...)`,
//! which Sass evaluates itself, or text only the browser can resolve. Sass
//! collapses what it can and emits the rest, so `if(sass(true) and css(): c)`
//! becomes `if(css(): c)`.
use Arc;
use ;
/// One `condition: value` branch of a CSS `if()`.
/// A CSS `if()` expression, in source order.
/// The condition of one branch.
///
/// Interpolations inside [`CssIfCondition::Raw`] and the expression inside
/// [`CssIfCondition::Sass`] are held unevaluated, because a condition that is
/// never reached must never run.