Commit e3fc1376 authored by Vincent Petry's avatar Vincent Petry Committed by GitHub

Merge pull request #27408 from owncloud/fix-caret-inconsistency

fix caret inconsistency
parents ed3809b1 d93a1649
......@@ -97,16 +97,16 @@
/* hover effect for app switcher label */
.header-appname-container .header-appname,
.menutoggle .icon-caret {
.menutoggle .caret {
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=75)";
opacity: .75;
}
.menutoggle:hover .header-appname,
.menutoggle:hover .icon-caret,
.menutoggle:hover .caret,
.menutoggle:focus .header-appname,
.menutoggle:focus .icon-caret,
.menutoggle:focus .caret,
.menutoggle.active .header-appname,
.menutoggle.active .icon-caret {
.menutoggle.active .caret {
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
opacity: 1;
}
......@@ -124,17 +124,14 @@
vertical-align: middle;
}
/* show caret indicator next to logo to make clear it is tappable */
#header .icon-caret {
display: inline-block;
width: 12px;
height: 12px;
margin: 0;
margin-top: -21px;
padding: 0;
#header .caret {
width: 10px;
height: 10px;
margin: -21px 0 0 3px;
vertical-align: middle;
}
/* do not show menu toggle on public share links as there is no menu */
#body-public #header .icon-caret {
#body-public #header .caret {
display: none;
}
......
......@@ -1562,11 +1562,11 @@ function initCore() {
// 2 is the additional offset between the triangles
if ($('#navigation').length) {
$('#header #owncloud + .menutoggle').one('click', function () {
var caretPosition = $('.header-appname + .icon-caret').offset().left - 2;
if (caretPosition > 255) {
// if the app name is longer than the menu, just put the triangle in the middle
return;
} else {
var caret = $('.header-appname + .caret');
var caretPosition = caret.offset().left - caret.width() / 2;
// only position the menu arrow if the caret is in its reach
if (caretPosition <= 255) {
$('head').append('<style>#navigation:after { left: ' + caretPosition + 'px; }</style>');
}
});
......
......@@ -57,7 +57,7 @@
}
?>
</h1>
<div class="icon-caret"></div>
<img alt="" class="caret" src="<?php print_unescaped(image_path('', 'actions/caret.svg')); ?>">
</a>
<div id="logo-claim" style="display:none;"><?php p($theme->getLogoClaim()); ?></div>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment