jquery.makeCollapsible.styles: Avoid FOUC for collapse button
authorFomafix <fomafix@googlemail.com>
Tue, 12 Feb 2019 01:22:47 +0000 (02:22 +0100)
committerFomafix <fomafix@googlemail.com>
Tue, 12 Feb 2019 01:22:47 +0000 (02:22 +0100)
The expand button on a <div> element has already a pseudo-class with the
expand text as content. For the collapse button this pseudo-class is
missing.

This change adds the missing pseudo-class for the collapse button to
prevent a missing button while loading.

The missing collapse button while loading is visible on
Special:RecentChanges. The expand button is always there.

Change-Id: I7fa80238d54ac43a96bf1d70bd42a0cccf90a73a

resources/src/jquery/jquery.makeCollapsible.styles.less

index 1ab91a9..ec96cb6 100644 (file)
@@ -47,7 +47,8 @@
        ul.mw-collapsible:not( @{exclude} ):before,
        // Where the tbody or thead is the first child of the collapsible table
        table.mw-collapsible:not( @{exclude} ) :first-child tr:first-child th:last-child:before,
-       table.mw-collapsible:not( @{exclude} ) > caption:first-child:after {
+       table.mw-collapsible:not( @{exclude} ) > caption:first-child:after,
+       div.mw-collapsible:not( @{exclude} ):before {
                content: '[@{msg-collapsible-collapse}]';
        }