Bug 255568
Summary: | :dir pseudo class doesn't invalidate after removing dir content attribute from document element | ||
---|---|---|---|
Product: | WebKit | Reporter: | sorvell |
Component: | CSS | Assignee: | Ryosuke Niwa <rniwa> |
Status: | RESOLVED FIXED | ||
Severity: | Normal | CC: | koivisto, rniwa, simon.fraser, webkit-bug-importer, zalan |
Priority: | P2 | Keywords: | InRadar |
Version: | Safari 16 | ||
Hardware: | Unspecified | ||
OS: | Unspecified |
sorvell
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
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/108480507>
Ryosuke Niwa
Pull request: https://github.com/WebKit/WebKit/pull/13134
EWS
Committed 263357@main (a3084fe071c6): <https://commits.webkit.org/263357@main>
Reviewed commits have been landed. Closing PR #13134 and removing active labels.