When direction is dynamically changed by setting the `dir` attribute to `rtl`, styles matching `:dir(rtl)` are applied as expected; however, if the `dir` attribute is removed, styles matching `:dir(rtl)` unexpectedly still apply. See this reproduction: https://lit.dev/playground/#gist=b7c7e390a923d0a54b5c3211bd69a668 Expected: 1. check the `rtl` checkbox to set document to rtl mode 2. styles matching `:dir(rtl)` apply 3. uncheck the `rtl` checkbox to set document back to default (ltr) direction 4. styles matching `:dir(rtl)` do *not* apply Actual: 1. check the `rtl` checkbox to set document to rtl mode 2. styles matching `:dir(rtl)` apply 3. uncheck the `rtl` checkbox to set document back to default (ltr) direction 4. styles matching `:dir(rtl)` *unexpectedly do* apply
<rdar://problem/108480507>
Pull request: https://github.com/WebKit/WebKit/pull/13134
Committed 263357@main (a3084fe071c6): <https://commits.webkit.org/263357@main> Reviewed commits have been landed. Closing PR #13134 and removing active labels.