| <!DOCTYPE html> |
| <!-- |
| | This test checks that a fixed position element has its em units computed |
| | from its parent's font-size, despite its containing block being the |
| | initial containing block. |
| --> |
| <html> |
| <head> |
| <style> |
| .root-container { |
| font-size: 2px; |
| } |
| .half-font-size-container { |
| font-size: 0.5em; |
| } |
| .fixed-element { |
| position: fixed; |
| width: 50em; |
| height: 50em; |
| top: 25px; |
| left: 25px; |
| background-color: rgb(100, 100, 255); |
| } |
| </style> |
| </head> |
| |
| <body> |
| <div class="root-container"> |
| <div class="half-font-size-container"> |
| <div class="fixed-element"> |
| </div> |
| </div> |
| </body> |
| </html> |