#include <functional>#include <optional>#include <span>#include <string_view>#include "donner/css/ComponentValue.h"Classes | |
| struct | donner::editor::CssSourceReference |
| A named reference as written in an authored CSS declaration. More... | |
| struct | donner::editor::CssSourceReferenceHooks |
| Optional accounting and fallback boundaries when indexing authored references. More... | |
Namespaces | |
| namespace | donner |
| Top-level Donner namespace, which is split into different sub-namespaces such as donner::svg and donner::css. | |
Functions | |
| bool | donner::editor::VisitCssSourceReferences (std::span< const css::ComponentValue > values, std::string_view cssSource, const std::function< bool(const CssSourceReference &)> &visit, const std::function< std::optional< bool >(std::string_view)> &hasValue={}, const CssSourceReferenceHooks &hooks={}) |
| Visit CSS references in lexical order. The visitor returns false to stop traversal. When available, the prepared-value predicate selects the active var() fallback. A missing answer leaves the fallback unvisited. Without a predicate all authored fallbacks are visited. | |
| bool donner::editor::VisitCssSourceReferences | ( | std::span< const css::ComponentValue > | values, |
| std::string_view | cssSource, | ||
| const std::function< bool(const CssSourceReference &)> & | visit, | ||
| const std::function< std::optional< bool >(std::string_view)> & | hasValue = {}, | ||
| const CssSourceReferenceHooks & | hooks = {} ) |
Visit CSS references in lexical order. The visitor returns false to stop traversal. When available, the prepared-value predicate selects the active var() fallback. A missing answer leaves the fallback unvisited. Without a predicate all authored fallbacks are visited.
| values | Parsed CSS component values to inspect. |
| cssSource | Authored CSS against which the components' offsets were measured. |
| visit | Callback for each reference. Borrowed names are valid only during traversal. |
| hasValue | Optional predicate for a usable prepared custom-property value. |
| hooks | Optional callbacks to charge work and track entry to and exit from fallbacks. |