Commit 63f40df6 authored by Dries's avatar Dries
Browse files

- Patch #535066 by jide, jbrown, marvil07, yoroy, mcjim, TheRec, mr.baileys:...

- Patch #535066 by jide, jbrown, marvil07, yoroy, mcjim, TheRec, mr.baileys: use CSS3 / IE filter to render toolbar shadow.
parent c863d0a7
......@@ -33,10 +33,17 @@ body.toolbar-drawer {
background: #666;
color: #ccc;
position: fixed;
top: 0;
left: 0;
right: 0;
top: 0;
margin: 0 -20px;
padding: 0 20px;
z-index: 600;
box-shadow: 0 3px 20px #000;
-moz-box-shadow: 0 3px 20px #000;
-webkit-box-shadow: 0 3px 20px #000;
filter: progid:DXImageTransform.Microsoft.Shadow(color=#000000, direction='180', strength='10');
-ms-filter: "progid:DXImageTransform.Microsoft.Shadow(color=#000000, direction='180', strength='10')";
}
#toolbar div.collapsed {
......@@ -44,15 +51,6 @@ body.toolbar-drawer {
visibility: hidden;
}
#toolbar div.shadow {
position: absolute;
left: 0;
right: 0;
bottom: -15px;
height: 15px;
background: url(toolbar.png) 0 -45px repeat-x;
}
#toolbar a {
text-decoration: none;
color: #fff;
......@@ -78,7 +76,7 @@ body.toolbar-drawer {
width: 11px;
height: 14px;
display: block;
background: url(toolbar.png) no-repeat -6px -63px;
background: url(toolbar.png) no-repeat 0 -45px;
text-indent: -9999px;
margin: 3px 0px;
}
......@@ -142,6 +140,9 @@ body.toolbar-drawer {
*/
* html #toolbar {
position: absolute;
top: 0;
left: 0;
margin: 0;
padding-right: 0;
left: -20px;
right: 0;
width: 100%;
}
......@@ -49,7 +49,7 @@ Drupal.toolbar.collapse = function() {
.removeClass('toggle-active')
.attr('title', toggle_text)
.html(toggle_text);
$('body').removeClass('toolbar-drawer').css('paddingTop', $('#toolbar').outerHeight());
$('body').addClass('toolbar-drawer').css('paddingTop', Drupal.toolbar.height());
$.cookie(
'Drupal.toolbar.collapsed',
1,
......@@ -71,7 +71,7 @@ Drupal.toolbar.expand = function() {
.addClass('toggle-active')
.attr('title', toggle_text)
.html(toggle_text);
$('body').addClass('toolbar-drawer').css('paddingTop', $('#toolbar').outerHeight());
$('body').addClass('toolbar-drawer').css('paddingTop', Drupal.toolbar.height());
$.cookie(
'Drupal.toolbar.collapsed',
0,
......@@ -96,7 +96,13 @@ Drupal.toolbar.toggle = function() {
};
Drupal.toolbar.height = function() {
return $("#toolbar").height();
var height = $('#toolbar').outerHeight();
// In IE, Shadow filter adds some extra height, so we need to remove it from
// the returned height.
if ($('#toolbar').css('filter').match(/DXImageTransform\.Microsoft\.Shadow/)) {
height -= $('#toolbar').get(0).filters.item("DXImageTransform.Microsoft.Shadow").strength;
}
return height;
};
})(jQuery);
modules/toolbar/toolbar.png

433 Bytes | W: | H:

modules/toolbar/toolbar.png

330 Bytes | W: | H:

modules/toolbar/toolbar.png
modules/toolbar/toolbar.png
modules/toolbar/toolbar.png
modules/toolbar/toolbar.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -35,6 +35,4 @@
<div class="<?php echo $toolbar['toolbar_drawer_classes']; ?>">
<?php print render($toolbar['toolbar_drawer']); ?>
</div>
<div class="shadow"></div>
</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