Open Bug 2024317 Opened 8 months ago Updated 1 month ago

www.dbs-cardgame.com - When trying to see the back of the card, the front gets mirrored instead

Categories

(Web Compatibility :: Site Reports, defect, P3)

Desktop
Windows 10

Tracking

(Webcompat Priority:P2, Webcompat Score:5)

REOPENED
157 Branch
Webcompat Priority P2
Webcompat Score 5

People

(Reporter: ctanase, Unassigned)

References

(Depends on 1 open bug, )

Details

(Keywords: webcompat:needs-sitepatch, webcompat:platform-bug, webcompat:site-report, Whiteboard: [webcompat-source:web-bugs])

User Story

user-impact-score:150
platform:windows,mac,linux,android
impact:content-missing
configuration:general
affects:all
branch:release
diagnosis-team:layout
autowebcompat-diagnosis-status:success

Attachments

(3 files)

Environment:
Operating system: Windows 10
Firefox version: Firefox 148.0/150

Steps to reproduce:

  1. Go to https://www.dbs-cardgame.com/fw/en/cardlist/?search=true&category%5B0%5D=583009#cards-1
  2. Click on "Show the BACK".
  3. Observe the behavior.

Expected Behavior:
It shows the back of the card.

Actual Behavior:
Shows a mirrored version of the front card.

Notes:

  • Reproduces regardless of the status of ETP
  • Reproduces in firefox-nightly, and firefox-release
  • Does not reproduce in chrome

Created from https://github.com/webcompat/web-bugs/issues/211977

Attached video FF vs Chrome.mp4 —

Workaround:
unset the css a-index property from https://www.dbs-cardgame.com/fw/renewal01/css/pages/cardlist_detail.css
i.e.,

.cardDetailPageCol .cardDetailPageContent .cardCol .cardImage .cardImageImg.img-front {
  z-index: unset;
}
User Story: (updated)
Webcompat Priority: --- → P3
Webcompat Score: --- → 1
Severity: -- → S2
User Story: (updated)
Webcompat Score: 1 → 4
Priority: -- → P3
User Story: (updated)
Webcompat Priority: P3 → P2
Webcompat Score: 4 → 5
User Story: (updated)
Webcompat Priority: P2 → P3
Webcompat Score: 5 → 4
See Also: → 2064634
Whiteboard: [webcompat-source:web-bugs] → [webcompat-source:web-bugs][autowebcompat:diagnose]
Whiteboard: [webcompat-source:web-bugs][autowebcompat:diagnose] → [webcompat-source:web-bugs]

Root cause analysis generated by autowebcompat bot:

Site flip-card CSS (cardlist_detail.css): .cardImage has transform-style:preserve-3d and gets transform:rotateY(180deg) in .mode-back. Its two children both have backface-visibility:hidden; .cardImageImg.img-front has NO transform of its own plus z-index:1, and .cardImageImg.img-back has transform:rotateY(180deg). There is no perspective anywhere.

Per CSS Transforms Level 2, .cardImage establishes a 3D rendering context and both faces belong to it, so each face's accumulated 3D transformation matrix includes the transform of the element establishing the context. After the flip, the untransformed front face accumulates rotateY(180deg), turns its back side toward the viewer, and must be suppressed by backface-visibility:hidden; the back face accumulates rotateY(180deg) x rotateY(180deg) = identity and is the face that shows.

Firefox does not do this for a child that has no transform of its own and transform-style:flat. It flattens such a child into the parent instead of treating it as a participant of the parent's 3D rendering context, so its backface state is computed as if the context root's rotateY(180deg) were not part of its accumulated matrix. The front face therefore keeps painting after the flip and, because the container is mirrored, the user sees a horizontally mirrored FRONT image.

The z-index:1 on the front face is not the bug itself; it is what makes the bug visible, stacking the wrongly painted front face above the back face. Without it the back face (later in DOM order) simply paints over the still-rendered front face, which is why the reported "z-index: unset" workaround appears to fix it.

This is a browser engine implementation difference, not UA sniffing or a site-side browser branch.

Spec references:
https://drafts.csswg.org/css-transforms-2/#3d-rendering-contexts
https://drafts.csswg.org/css-transforms-2/#accumulated-3d-transformation-matrix-computation
https://drafts.csswg.org/css-transforms-2/#backface-visibility-property

Evidence:

Investigated the card detail iframe (cardlist/detail.php?card_no=FB09-001) in both browsers via DevTools.

  1. Computed styles are byte-identical across browsers: front face transform "none", backface-visibility "hidden", z-index "1"; back face transform matrix3d(-1,0,0,0, 0,1,0,0, 0,0,-1,0, 0,0,0,1), backface-visibility "hidden", z-index "auto"; container transform-style preserve-3d, no perspective; DOM order front then back. No console errors, no UA-conditional code.

  2. After clicking "Show the BACK": element screenshot of .cardImage in Firefox shows the FRONT artwork horizontally mirrored (text reversed). Chrome shows the real back artwork.

  3. Live DOM edits in Firefox: setting the front face z-index to auto makes the back render correctly (reproduces the reported workaround). Then additionally setting the back face to display:none brings the mirrored FRONT back - proving the front face is never actually hidden by backface-visibility in Firefox, and that the workaround only changes paint order. Setting filter:none on the filtered ancestor .cardColBox changed nothing, ruling out ancestor-filter flattening.

  4. Variant probe (front face alone inside a preserve-3d parent rotated 180deg): Firefox hides the face only when the face itself has a transform or preserve-3d - rotateY(0deg) hidden, translateZ(0) hidden, 2D rotate(0deg) hidden, transform-style:preserve-3d hidden - but leaves the plain untransformed face VISIBLE (the bug). Chrome hides it in every one of those cases. Adding perspective on the stage or on the parent made no difference.

  5. Reduced testcase /app/diagnosis/testcase=3ioro80j.html loaded in both browsers: Chrome shows the green BACK in box 1 and empty boxes 2 and 3; Firefox shows a mirrored red FRONT in box 1 and box 2, and an empty box 3 (the control where the same face is given transform: rotateY(0deg)). Same divergence as the real site.

User Story: (updated)

Seems like bug 1884044. Right tn?

User Story: (updated)
Depends on: 1884044
Flags: needinfo?(tnikkel)
User Story: (updated)
Webcompat Priority: P3 → P2
Webcompat Score: 4 → 5

Yeah bug 1884044 until I split off part of it into bug 2066084. I think bug 2066084 will fix this but I need to verify first.

User Story: (updated)

Confirmed bug 2066084 fixes this, both the original site and the reduced testcase. Not sure how we handle closing web compat bugs.

Depends on: 2066084
No longer depends on: 1884044
Flags: needinfo?(tnikkel)
Status: NEW → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → 157 Branch

Verified, the issue can be reproduced with the RC v157. When clicking on "Show the BACK" button, a mirrored version of the front card is displayed.

Tested with:

  • Browser / Version: Firefox 157.0-candidate build 1 / Firefox Nightly 158.0a1(2026-09-23)
  • Operating System: Windows 10
Status: RESOLVED → REOPENED
Resolution: FIXED → ---

The fix got backed out. It should re-land soon with the further fixes it needs.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: