Skip to content

Commit

Permalink
Add "contain: paint" to XR DOM Overlay UA style
Browse files Browse the repository at this point in the history
As suggested in immersive-web/dom-overlays#20 (comment)

This ensures that top layer elements act as a containing block for
"position: fixed" descendants.

Bug: 1060731
Change-Id: Id5bedac6ecde75a11d83442c025c0bd1da4e1cc2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2098178
Reviewed-by: Chris Harrelson <[email protected]>
Commit-Queue: Klaus Weidner <[email protected]>
Cr-Commit-Position: refs/heads/master@{#749458}
  • Loading branch information
klausw authored and Commit Bot committed Mar 12, 2020
1 parent 31b4286 commit e501d4a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions third_party/blink/renderer/core/css/webxr_overlay.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
/* force a transparent background */
background: rgba(0,0,0,0) !important;

/* act as containing block for descendants */
contain: paint !important;

/* the following styling is identical to :fullscreen */
position: fixed !important;
top: 0 !important;
Expand Down

0 comments on commit e501d4a

Please sign in to comment.