fixed-position-scrolling-clip.yaml (1212B)
1 root: 2 items: 3 - type: scroll-frame 4 bounds: [10, 10, 100, 300] 5 content-size: [100, 700] 6 id: 41 7 scroll-offset: [0, 50] 8 items: 9 # The rectangles below should stay in place even when the parent scroll area scrolls, 10 # because they use the root reference frame as their scroll node (fixed position). 11 # On the other hand, the clip item here will scroll with its parent scroll area. Normally 12 # fixed position items would only be clipped by their reference frame (in this case the 13 # root), but since these items specify an auxiliary clip, they will be clipped by their 14 # sibling clip (42). 15 - type: clip 16 bounds: [10, 60, 50, 50] 17 id: 42 18 - type: clip-chain 19 id: 142 20 clips: [42] 21 - type: stacking-context 22 bounds: [10, 10, 100, 100] 23 items: 24 - type: rect 25 bounds: [0, 0, 100, 50] 26 color: green 27 clip-chain: 142 28 spatial-id: root-reference-frame 29 - type: rect 30 bounds: [0, 50, 100, 50] 31 color: red 32 clip-chain: 142 33 spatial-id: root-reference-frame