Skip to content
Permalink
Browse files
Address UX issues with the Contribute menu.
https://bugs.webkit.org/show_bug.cgi?id=151874

Reviewed by Timothy Hatcher.

* wp-content/themes/webkit/functions.php:
* wp-content/themes/webkit/header.php:
* wp-content/themes/webkit/style.css:
(time, mark, audio, video):
(footer, header, hgroup, menu, nav, section):
(html):
(body):
(ol, ul):
(blockquote, q):
(q:before, q:after):
(table):
(p:empty):
(.admin-bar p > a[name]::before):
(.screen-reader-text):
(.screen-reader-text:focus):
(pre):
(code):
(.feature-header:after):
(.feature.opened .feature-header:after):
(footer nav a:hover):
(header .menu-item-has-children .label-toggle::after):
(header .menu-item):
(.sub-menu-layer):
(.sub-menu-layer .menu-item:first-child):
(.menu > .menu-item > .menu-toggle:checked + .sub-menu):
(@media only screen and (max-width: 920px)):
(header .menu-item > .menu-toggle:checked + a > .label-toggle::after):
(header .menu):
(header .menu-toggle:checked ~ ul):
(header .sub-menu-layer:before):
(header .menu > .menu-item > .menu-toggle:checked ~ .sub-menu):
(footer nav li):
(@media only screen and (max-width: 690px)):
(.feature-filters:after):
(.feature-filters.opened:after):
(#wpadminbar):
(.table-of-contents label:after):
(.menu-toggle:checked ~ .table-of-contents label:after):
(.table-of-contents h6):
(header nav .menu-item-has-children .label-toggle): Deleted.
(header nav .menu-item): Deleted.
(header .menu > .menu-item-has-children:hover > a::before): Deleted.
(.menu > .menu-item > .menu-toggle:checked ~ .sub-menu): Deleted.
(header nav .menu-toggle:checked ~ ul): Deleted.
(header .menu-toggle:checked ~ .sub-menu): Deleted.
(@media only screen and (max-width: 782px)): Deleted.


Canonical link: https://commits.webkit.org/170092@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@193642 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
jdatapple committed Dec 7, 2015
1 parent 0ed0a3e commit 967f53956045bf425742aeab25c94843a1d302b3
@@ -1,3 +1,57 @@
2015-12-07 Jonathan Davis <jond@apple.com>

Address UX issues with the Contribute menu.
https://bugs.webkit.org/show_bug.cgi?id=151874

Reviewed by Timothy Hatcher.

* wp-content/themes/webkit/functions.php:
* wp-content/themes/webkit/header.php:
* wp-content/themes/webkit/style.css:
(time, mark, audio, video):
(footer, header, hgroup, menu, nav, section):
(html):
(body):
(ol, ul):
(blockquote, q):
(q:before, q:after):
(table):
(p:empty):
(.admin-bar p > a[name]::before):
(.screen-reader-text):
(.screen-reader-text:focus):
(pre):
(code):
(.feature-header:after):
(.feature.opened .feature-header:after):
(footer nav a:hover):
(header .menu-item-has-children .label-toggle::after):
(header .menu-item):
(.sub-menu-layer):
(.sub-menu-layer .menu-item:first-child):
(.menu > .menu-item > .menu-toggle:checked + .sub-menu):
(@media only screen and (max-width: 920px)):
(header .menu-item > .menu-toggle:checked + a > .label-toggle::after):
(header .menu):
(header .menu-toggle:checked ~ ul):
(header .sub-menu-layer:before):
(header .menu > .menu-item > .menu-toggle:checked ~ .sub-menu):
(footer nav li):
(@media only screen and (max-width: 690px)):
(.feature-filters:after):
(.feature-filters.opened:after):
(#wpadminbar):
(.table-of-contents label:after):
(.menu-toggle:checked ~ .table-of-contents label:after):
(.table-of-contents h6):
(header nav .menu-item-has-children .label-toggle): Deleted.
(header nav .menu-item): Deleted.
(header .menu > .menu-item-has-children:hover > a::before): Deleted.
(.menu > .menu-item > .menu-toggle:checked ~ .sub-menu): Deleted.
(header nav .menu-toggle:checked ~ ul): Deleted.
(header .menu-toggle:checked ~ .sub-menu): Deleted.
(@media only screen and (max-width: 782px)): Deleted.

2015-12-05 Timothy Hatcher <timothy@apple.com>

One last fix for https redirect.
@@ -210,8 +210,6 @@ class Responsive_Toggle_Walker_Nav_Menu extends Walker_Nav_Menu {

public function start_lvl( &$output, $depth = 0, $args = array() ) {
$output .= "\n" . str_repeat("\t", $depth);
if ( ! empty($this->toggleid) )
$output .= "<input type=\"checkbox\" id=\"toggle-{$this->toggleid}\" class=\"menu-toggle\" />";
$classes = array("sub-menu");
if ( 0 == $depth ) {
$classes[] = "sub-menu-layer";
@@ -232,9 +230,10 @@ public function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0
$after = $args->link_after;

if ( in_array('menu-item-has-children', $item->classes) && 0 == $depth ) {
$this->toggleid = $item->ID;
$args->before .= "<input type=\"checkbox\" id=\"toggle-{$item->ID}\" class=\"menu-toggle\" />";
$args->link_before = "<label for=\"toggle-{$item->ID}\" class=\"label-toggle\">" . $args->link_before;
$args->link_after .= "</label>";
$this->toggleid = $item->ID;
$item->url = '#nav-sub-menu';
} elseif ( in_array('menu-item-has-children', $item->classes) && 1 == $depth ) {
// $item->role = "presentation";
@@ -33,7 +33,7 @@
<?php wp_nav_menu( array(
'walker' => new Responsive_Toggle_Walker_Nav_Menu(),
'theme_location' => 'site-nav',
'items_wrap' => '<label for="%1$s-toggle" class="label-toggle main-menu" data-open="Main Menu" data-close="Close Menu" onclick></label><input type="checkbox" id="%1$s-toggle" class="menu-toggle" /><ul id="%1$s" class="%2$s" role="menubar">%3$s</ul>',
'items_wrap' => '<input type="checkbox" id="%1$s-toggle" class="menu-toggle" /><label for="%1$s-toggle" class="label-toggle main-menu" data-open="Main Menu" data-close="Close Menu"></label><ul id="%1$s" class="%2$s" role="menubar">%3$s</ul>',
) ); ?></nav>
</div>
</header>

0 comments on commit 967f539

Please sign in to comment.