MCPcopy Create free account
hub / github.com/csskit/csskit / merge

Method merge

crates/css_ast/src/metadata.rs:368–384  ·  view source on GitHub ↗
(mut self, other: Self)

Source from the content-addressed store, hash-verified

366impl NodeMetadata for CssMetadata {
367 #[inline]
368 fn merge(mut self, other: Self) -> Self {
369 self.property_groups |= other.property_groups;
370 self.applies_to |= other.applies_to;
371 self.box_sides |= other.box_sides;
372 self.box_portions |= other.box_portions;
373 self.declaration_kinds |= other.declaration_kinds;
374 self.used_at_rules |= other.used_at_rules;
375 self.vendor_prefixes |= other.vendor_prefixes;
376 self.node_kinds |= other.node_kinds;
377 self.property_kinds |= other.property_kinds;
378 // For unitless_zero_resolves, we keep Number if either side has it (conservative)
379 if other.unitless_zero_resolves == UnitlessZeroResolves::Number {
380 self.unitless_zero_resolves = UnitlessZeroResolves::Number;
381 }
382 self.size = self.size.max(other.size);
383 self
384 }
385
386 #[inline]
387 fn with_size(mut self, size: u16) -> Self {

Callers 3

metadataMethod · 0.45
metadataMethod · 0.45

Calls

no outgoing calls

Tested by 1