mirror of
https://github.com/StarCitizenTools/mediawiki-extensions-TabberNeue.git
synced 2024-09-23 10:26:50 +00:00
feat: use CSS instead of __NOEDITSECTION__ to hide edit buttons
* Appending __NOEDITSECTION__ to tab body seems to break the table markup (#12) * Edit buttons still work for transcluded tabs so it should be visible Closes #12
This commit is contained in:
parent
38a47307d7
commit
69c638330d
|
@ -72,9 +72,7 @@ class TabberNeueHooks {
|
|||
// Use array_pad to make sure at least 2 array values are always returned
|
||||
list( $tabName, $tabBody ) = array_pad( array_map( 'trim', explode( '=', $tab, 2 ) ), 2, '' );
|
||||
|
||||
// Append __NOEDITSECTION__ to prevent section edit links from being added by the parser
|
||||
// since section edit links do not work inside a tabber body
|
||||
$tabBody = $parser->recursiveTagParseFully( '__NOEDITSECTION__' . $tabBody, $frame );
|
||||
$tabBody = $parser->recursiveTagParseFully( $tabBody, $frame );
|
||||
|
||||
$tab = '<article class="tabber__panel" title="' . htmlspecialchars( $tabName ) .
|
||||
'">' . $tabBody . '</article>';
|
||||
|
|
|
@ -138,6 +138,12 @@
|
|||
overflow-y: auto;
|
||||
overscroll-behavior-y: contain;
|
||||
scroll-snap-align: start;
|
||||
|
||||
// Hide edit buttons for non-transclusion tabs since they don't work
|
||||
/* stylelint-disable-next-line selector-class-pattern */
|
||||
&:not( [ data-tabber-page-title ] ) .mw-editsection {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
&__transclusion {
|
||||
|
|
Loading…
Reference in a new issue