MediaWiki:Common.css: Difference between revisions

From SZ
Jump to navigation Jump to search
No edit summary
Tag: Manual revert
No edit summary
Line 1: Line 1:
/* CSS placed here will be applied to all skins */
/* CSS placed here will be applied to all skins */
/* Collapsible elements */


mw.loader.using('jquery.makeCollapsible').then(function () {
.mw-collapsible-arrowtoggle {
    // Turn sidebar collapsibles into an accordion
 
    $('#mw-panel .mw-collapsible').on('beforeExpand.mw-collapsible', function () {
  background-image: url('https://upload.wikimedia.org/wikipedia/commons/4/41/MediaWiki_Vector_skin_right_arrow.png'); /* @noflip */
        // Collapse siblings when one expands
 
        $(this).siblings('.mw-collapsible').each(function () {
  background-position: left center;
            if (!$(this).hasClass('mw-collapsed')) {
 
                $(this).find('.mw-collapsible-toggle').click();
  /* Add other styles as desired for the toggle arrow */
            }
        });
    });
});


/* Style collapsible sidebar sections like dropdowns */
.mw-collapsible-toggle {
    float: right;
    font-weight: bold;
    cursor: pointer;
}
}


.mw-collapsible.mw-collapsed > .mw-collapsible-toggle::after {
.mw-collapsible-toggle-collapsed.mw-collapsible-arrowtoggle {
    content: " ▼"; /* arrow when collapsed */
 
  background-image: url('https://upload.wikimedia.org/wikipedia/commons/1/1e/MediaWiki_Vector_skin_left_arrow.png'); /* @noflip */
 
  /* Add other styles for the collapsed state of the arrow */
 
}
}


.mw-collapsible:not(.mw-collapsed) > .mw-collapsible-toggle::after {
     content: " ▲";  /* arrow when expanded */
 
/* Adjustments for the toggle link */
 
.mw-collapsible span.mw-collapsible-toggle {
 
    float: left;
 
    margin-left: 0;
 
     margin-right: 1em;
 
    /* This example floats the toggle left and adjusts margins */
 
}
 
   
 
/* Hide the content within collapsed sections */
 
.mw-collapsible-content {
 
    display: none;
 
}
 
.mw-collapsible-toggle-expanded .mw-collapsible-content {
 
    display: block;
 
}
}

Revision as of 14:12, 20 August 2025

/* CSS placed here will be applied to all skins */
/* Collapsible elements */

.mw-collapsible-arrowtoggle {

  background-image: url('https://upload.wikimedia.org/wikipedia/commons/4/41/MediaWiki_Vector_skin_right_arrow.png'); /* @noflip */

  background-position: left center;

  /* Add other styles as desired for the toggle arrow */

}

.mw-collapsible-toggle-collapsed.mw-collapsible-arrowtoggle {

  background-image: url('https://upload.wikimedia.org/wikipedia/commons/1/1e/MediaWiki_Vector_skin_left_arrow.png'); /* @noflip */

  /* Add other styles for the collapsed state of the arrow */

}

 

/* Adjustments for the toggle link */

.mw-collapsible span.mw-collapsible-toggle {

    float: left;

    margin-left: 0;

    margin-right: 1em;

    /* This example floats the toggle left and adjusts margins */

}

 

/* Hide the content within collapsed sections */

.mw-collapsible-content {

    display: none;

}

.mw-collapsible-toggle-expanded .mw-collapsible-content {

    display: block;

}