From d619d88b981c6c902bb120254f7a0e5fe6a8f493 Mon Sep 17 00:00:00 2001 From: Fomafix Date: Sun, 15 Feb 2015 11:26:36 +0000 Subject: [PATCH] jquery.makeCollapsible: Align toggle based on content language The collapsible toggle button is in user interface language but the alignment of this button should fit to the direction of the content language. Change-Id: I31927b8e091bdf81458c7d3d0cd5f6040af5f0f4 --- .../src/jquery/jquery.makeCollapsible.css | 24 +++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/resources/src/jquery/jquery.makeCollapsible.css b/resources/src/jquery/jquery.makeCollapsible.css index 0f47150975..2e5efbac8b 100644 --- a/resources/src/jquery/jquery.makeCollapsible.css +++ b/resources/src/jquery/jquery.makeCollapsible.css @@ -6,18 +6,38 @@ -ms-user-select: none; user-select: none; } +/* Align the toggle based on the direction of the content language */ +/* @noflip */ +.mw-content-ltr .mw-collapsible-toggle, +.mw-content-rtl .mw-content-ltr .mw-collapsible-toggle { + float: right; +} +/* @noflip */ +.mw-content-rtl .mw-collapsible-toggle, +.mw-content-ltr .mw-content-rtl .mw-collapsible-toggle { + float: left; +} + .mw-customtoggle, .mw-collapsible-toggle { cursor: pointer; } /* collapse links in captions should be inline */ -caption .mw-collapsible-toggle { +caption .mw-collapsible-toggle, +.mw-content-ltr caption .mw-collapsible-toggle, +.mw-content-rtl caption .mw-collapsible-toggle, +.mw-content-rtl .mw-content-ltr caption .mw-collapsible-toggle, +.mw-content-ltr .mw-content-rtl caption .mw-collapsible-toggle { float: none; } /* list-items go as wide as their parent element, don't float them inside list items */ -li .mw-collapsible-toggle { +li .mw-collapsible-toggle, +.mw-content-ltr li .mw-collapsible-toggle, +.mw-content-rtl li .mw-collapsible-toggle, +.mw-content-rtl .mw-content-ltr li .mw-collapsible-toggle, +.mw-content-ltr .mw-content-rtl li .mw-collapsible-toggle { float: none; } -- 2.20.1