Ori.livneh has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/84290


Change subject: (WIP) CSS-driven collapsible nav in Vector
......................................................................

(WIP) CSS-driven collapsible nav in Vector

Using the technique described in
<http://www.thecssninja.com/css/css-tree-menu>.

Change-Id: I9dee65eb72f7f6f1f48a7d706d0ed3bfd48ee1bb
---
M skins/Vector.php
M skins/vector/screen.css
2 files changed, 34 insertions(+), 11 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/90/84290/1

diff --git a/skins/Vector.php b/skins/Vector.php
index 97b28ed..87726d3 100644
--- a/skins/Vector.php
+++ b/skins/Vector.php
@@ -295,7 +295,8 @@
                $msgObj = wfMessage( $msg );
                ?>
 <div class="portal" role="navigation" id='<?php echo Sanitizer::escapeId( 
"p-$name" ) ?>'<?php echo Linker::tooltip( 'p-' . $name ) ?> 
aria-labelledby='<?php echo Sanitizer::escapeId( "p-$name-label" ) ?>'>
-       <h3<?php $this->html( 'userlangattributes' ) ?> id='<?php echo 
Sanitizer::escapeId( "p-$name-label" ) ?>'><?php echo htmlspecialchars( 
$msgObj->exists() ? $msgObj->text() : $msg ); ?></h3>
+       <label for="<?php echo Sanitizer::escapeId( "p-$name-checkbox" ); ?>" 
<?php $this->html( 'userlangattributes' ) ?> id='<?php echo 
Sanitizer::escapeId( "p-$name-label" ) ?>'><?php echo htmlspecialchars( 
$msgObj->exists() ? $msgObj->text() : $msg ); ?></label>
+       <input type="checkbox" id="<?php echo Sanitizer::escapeId( 
"p-$name-checkbox" ) ?>" />
        <div class="body">
 <?php
                if ( is_array( $content ) ) { ?>
diff --git a/skins/vector/screen.css b/skins/vector/screen.css
index 8a69f84..b9eb7fb 100644
--- a/skins/vector/screen.css
+++ b/skins/vector/screen.css
@@ -475,16 +475,6 @@
        padding-bottom: 1.5em;
        direction: ltr;
 }
-div#mw-panel div.portal h3 {
-       font-weight: normal;
-       color: #444;
-       padding: 0.25em;
-       padding-top: 0;
-       padding-left: 1.75em;
-       cursor: default;
-       border: none;
-       font-size: 0.75em;
-}
 div#mw-panel div.portal div.body {
        margin: 0;
        padding-top: 0.5em;
@@ -910,3 +900,35 @@
        -o-transition: margin-left 250ms;
        transition: margin-left 250ms;
 }
+
+
+.portal input {
+       position: absolute;
+       left: 0;
+       margin-left: 0;
+       opacity: 0;
+       z-index: 2;
+       cursor: pointer;
+       height: 1em;
+       width: 1em;
+       top: 0;
+}
+
+.portal input + .body ul {
+    display: none;
+}
+
+.portal input:checked + .body ul {
+       display: block;
+}
+
+div#mw-panel div.portal label {
+       font-weight: normal;
+       color: #444;
+       padding: 0.25em;
+       padding-top: 0;
+       padding-left: 1.75em;
+       cursor: default;
+       border: none;
+       font-size: 0.75em;
+}

-- 
To view, visit https://gerrit.wikimedia.org/r/84290
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9dee65eb72f7f6f1f48a7d706d0ed3bfd48ee1bb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to