Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
CRAP
100.00% covered (success)
100.00%
1 / 1
PropertyDefinition
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
100.00% covered (success)
100.00%
1 / 1
 __construct
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2
3declare(strict_types=1);
4
5namespace Phpdftk\Css\Cascade;
6
7use Phpdftk\Css\Value\Value;
8
9/**
10 * Per-property metadata consumed by the cascade and the computed-value
11 * resolution. Each CSS property registered with the engine ships an
12 * immutable definition stating its initial value, whether it inherits, and
13 * whether it accepts the special `inherit` / `initial` / `unset` keywords
14 * (every property does, but we keep the flag for forward compat).
15 *
16 * Phase 1D.3 ships a small subset — color, font, box-model essentials —
17 * sufficient for the MVP invoice fixture. Additional properties slot in by
18 * appending registrations in `PropertyRegistry::default()`.
19 */
20final readonly class PropertyDefinition
21{
22    public function __construct(
23        public string $name,
24        public Value $initial,
25        public bool $inherits = false,
26    ) {}
27}