Source code

Revision control

Copy as Markdown

Other Tools

# This test ensures that an opacity filter forces the flattening of preserve-3D context.
# The innermost rectangle has backface visibility disabled. If the parent stacking context
# is a part of preserve-3D hierarchy, then the item would be backward-facing, thus invisible.
# With the opacity filter, it's no longer a part of the preserve-3D, thus visible.
---
root:
items:
- type: stacking-context
bounds: [0, 0, 200, 200]
transform-style: preserve-3d
transform: rotate-y(180)
items:
- type: stacking-context
bounds: [0, 0, 200, 200]
transform-style: preserve-3d
filters: [opacity(0.5)]
items:
- type: rect
bounds: [0, 0, 200, 200]
color: red
backface-visible: false