Make CategoryTree arrow expansion work outside mw-content-{ltr,rtl}

The old code relies on CSS Janus to transform the default case outside
mw-content-{ltr,rtl} which can't be applied here so let's consider
this case also by relying only on dir attributes, the same direction
as T371265.

In future we can use &:dir( ltr ) and &:dir( rtl ) as we do in new
codes but as that isn't supported on all browsers we support.

Change-Id: Icf6b8e184ce981e6e8f16dafa9e14a19154ff0e3
This commit is contained in:
Ebrahim Byagowi 2024-10-05 16:46:19 +03:30
parent 5ba10fcef7
commit be7320b4fc

View file

@ -120,13 +120,13 @@
.CategoryTreeEmptyBullet, .CategoryTreeEmptyBullet,
.CategoryTreeToggle[ aria-expanded='false' ] { .CategoryTreeToggle[ aria-expanded='false' ] {
.mw-content-ltr &, [ dir='ltr' ] &,
.mw-content-rtl .mw-content-ltr & { [ dir='rtl' ] [ dir='ltr' ] & {
transform: rotate( -90deg ); transform: rotate( -90deg );
} }
.mw-content-rtl &, [ dir='rtl' ] &,
.mw-content-ltr .mw-content-rtl & { [ dir='ltr' ] [ dir='rtl' ] & {
transform: rotate( 90deg ); transform: rotate( 90deg );
} }
} }