whether this is the second pass. Custom properties are left alone then: a custom property whose substituted value happens to spell a rollback keyword is not a rollback, it is just a token stream that no property can use (WPT-matching browser behavior). This pass also discards the retained cascade history.
whether a value was rolled back to one that still contains var()
Replace every rollback keyword that won the cascade with the declaration it rolls back to, so that the layout engine sees a real value instead of the keyword. When Vivliostyle's own cascade has nothing left to roll back to, the keyword survives on purpose and is handed to the browser through the
styleattribute of the generated element (seeresolveRollbackValue).This runs twice: once as soon as the cascade is settled, because the value rolled back to may itself be a shorthand or contain var(), and once more after var() substitution, because a keyword written in a var() fallback only becomes the whole value there.