Commit 46f5381
committed
feat(ie-css): implement style resolution pipeline #23
resolve.rs: walks DOM tree depth-first, produces ResolvedStyle per node:
- Calls cascade() for each element with UA + author stylesheets
- Applies inline styles as highest priority override
- Resolves 53 properties: cascaded → inherited → initial → computed
- compute_value: em (parent font-size), rem (16px root), vw/vh
(viewport), vmin/vmax, pt (4/3 px ratio) → absolute px
- ResolvedStyle with get(), display(), get_length_px(), get_color()
- ViewportSize parameter (default 1920x1080)
- Inheritance: inherited properties propagate from parent
- initial/inherit/initial keywords handled
12 new tests: color, inheritance, non-inheritance, em/rem/viewport
resolution, UA defaults, inline override, deep chain, initial values.
85 total ie-css tests.1 parent 7c85735 commit 46f5381
2 files changed
Lines changed: 491 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| 16 | + | |
15 | 17 | | |
16 | 18 | | |
17 | 19 | | |
| |||
0 commit comments