Bug 253508

Summary: CSS writing-mode does not reset correctly when overridden in media queries
Product: WebKit Reporter: Roger Que <webkit>
Component: CSSAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: koivisto, mmaxfield, simon.fraser, webkit-bug-importer, zalan
Priority: P2 Keywords: InRadar
Version: Safari 16   
Hardware: Mac (Intel)   
OS: macOS 13   
Attachments:
Description Flags
Minimal example none

Description Roger Que 2023-03-07 05:58:22 PST
Created attachment 465338 [details]
Minimal example

Steps to reproduce with the example attachment:

1. Make the viewport wider than it is tall, so the text is vertical.
2. Now make the viewport taller than it is wide, so the aspect ratio media query no longer matches.

The text should return to being horizontal, since that is the built-in default style, but instead remains vertical, with the additional problem of the CJK characters now being sideways. This incorrect rendering stays no matter how the viewport is resized.

Explicitly setting `writing-mode: horizontal-tb` outside the media query gives the expected behavior and is a simple workaround.
Comment 1 Radar WebKit Bug Importer 2023-03-14 06:59:31 PDT
<rdar://problem/106700291>