lib/css/src/cascade/root.zig

daab053ee43316e1809a84551d573ddd1e5bf3d2

 1 //! The cascade: origin, importance, specificity, source order, inheritance,
 2 //! the four CSS wide keywords, custom properties, and `var()` substitution.
 3 //!
 4 //! `Resolver` holds one winning declaration per property per cascade level, so
 5 //! `revert` is answered by re-picking with the reverting origin removed rather
 6 //! than by a second pass over the matched rules. The caller owns the resolver
 7 //! and reuses it across elements, so the cascade allocates nothing.
 8 //!
 9 //! A computed style is a dense array indexed by property identifier, which is
10 //! what makes inheritance a copy and comparison a memcmp.
11 
12 const resolve = @import("resolve.zig");
13 
14 pub const Computed = resolve.Computed;
15 pub const Custom = resolve.Custom;
16 pub const CustomSlot = resolve.CustomSlot;
17 pub const CustomTable = resolve.CustomTable;
18 pub const Level = resolve.Level;
19 pub const Origin = resolve.Origin;
20 pub const Resolver = resolve.Resolver;
21 pub const Slot = resolve.Slot;
22 pub const flag_pending = resolve.flag_pending;
23 pub const level_count = resolve.level_count;
24 pub const levelOf = resolve.levelOf;
25 pub const max_custom_properties = resolve.max_custom_properties;
26 pub const max_substitution_bytes = resolve.max_substitution_bytes;
27 pub const max_substitution_depth = resolve.max_substitution_depth;
28 pub const originOf = resolve.originOf;