mirror of
https://github.com/StarCitizenTools/mediawiki-skins-Citizen.git
synced 2024-11-24 22:35:45 +00:00
refactor(core): ♻️ prepare for heading structure changes
This commit is contained in:
parent
ad714dcfed
commit
9652d4f8ed
|
@ -10,7 +10,8 @@ function initCollapsibleSections( document ) {
|
|||
for ( let i = 0; i < headings.length; i++ ) {
|
||||
const j = i + 1,
|
||||
collapsibleID = prefix + 'collapsible-' + j,
|
||||
headline = headings[ i ].querySelector( '.mw-headline' );
|
||||
/* T13555 */
|
||||
headline = headings[ i ].querySelector( '.mw-headline' ) ?? headings[ i ].querySelector( '.mw-heading' );
|
||||
|
||||
// Set up ARIA
|
||||
headline.setAttribute( 'tabindex', 0 );
|
||||
|
|
|
@ -56,7 +56,8 @@ function initToC() {
|
|||
const initSectionObserver = require( './sectionObserver.js' ).init;
|
||||
|
||||
const sectionObserver = initSectionObserver( {
|
||||
elements: bodyContent.querySelectorAll( '.mw-headline' ),
|
||||
/* T13555 */
|
||||
elements: bodyContent.querySelectorAll( '.mw-headline' ) ?? bodyContent.querySelectorAll( '.mw-heading' ),
|
||||
topMargin: getTopMargin(),
|
||||
onIntersection: ( section ) => { changeActiveSection( section.id ); }
|
||||
} );
|
||||
|
|
|
@ -12,12 +12,18 @@
|
|||
transform: rotate3d( 1, 0, 0, 180deg );
|
||||
}
|
||||
|
||||
.mw-headline {
|
||||
.mw-headline,
|
||||
/* T13555 */
|
||||
.mw-heading h1,
|
||||
.mw-heading h2 {
|
||||
opacity: var( --opacity-icon-base );
|
||||
}
|
||||
}
|
||||
|
||||
.mw-headline {
|
||||
.mw-headline,
|
||||
/* T13555 */
|
||||
.mw-heading h1,
|
||||
.mw-heading h2 {
|
||||
transition: @transition-opacity;
|
||||
|
||||
&:hover {
|
||||
|
|
Loading…
Reference in a new issue