Source code

Revision control

Copy as Markdown

Other Tools

# This test ensures that we flatten the trasformations (i.e. zero out Z coordinates)
# at the boundaries of preserve-3d hierarchies.
# If the stacking context isn't flattened at the preserve-3d boundary here,
# it's non-zero Z component starts affecting the screen space position
# due to the "rotate-x" transform at the top level.
---
root:
items:
-
bounds: [100, 100, 0, 0]
type: stacking-context
transform: rotate-x(60)
transform-style: flat
items:
-
type: "stacking-context"
transform: translate(0, 0, 200)
transform-style: preserve-3d
items:
-
bounds: [0, 0, 150, 150]
type: rect
color: green