Skip to content

Commit a2db620

Browse files
committed
Tooltip: Move box-shadow definition to ui-widget-shadow class
.ui-widget-shadow was created when box-shadow wasn't available. By now, there's no point in faking a custom shadow anymore. This removes the only non-structural CSS from a widget-specific file.
1 parent 054a9cc commit a2db620

File tree

3 files changed

+4
-9
lines changed

3 files changed

+4
-9
lines changed

themes/base/theme.css

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -401,10 +401,6 @@
401401
filter: Alpha(Opacity=30)/*{opacityFilterOverlay}*/; /* support: IE8 */
402402
}
403403
.ui-widget-shadow {
404-
margin: -8px/*{offsetTopShadow}*/ 0 0 -8px/*{offsetLeftShadow}*/;
405-
padding: 8px/*{thicknessShadow}*/;
406-
background: #aaaaaa/*{bgColorShadow}*/ url("images/ui-bg_flat_0_aaaaaa_40x100.png")/*{bgImgUrlShadow}*/ 50%/*{bgShadowXPos}*/ 50%/*{bgShadowYPos}*/ repeat-x/*{bgShadowRepeat}*/;
407-
opacity: .3/*{opacityShadow}*/;
408-
filter: Alpha(Opacity=30)/*{opacityFilterShadow}*/; /* support: IE8 */
409-
border-radius: 8px/*{cornerRadiusShadow}*/;
404+
-webkit-box-shadow: 0/*{offsetLeftShadow}*/ 0/*{offsetTopShadow}*/ 5px/*{thicknessShadow}*/ #ddd/*{bgColorShadow}*/;
405+
box-shadow: 0/*{offsetLeftShadow}*/ 0/*{offsetTopShadow}*/ 5px/*{thicknessShadow}*/ #ddd/*{bgColorShadow}*/;
410406
}

themes/base/tooltip.css

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313
position: absolute;
1414
z-index: 9999;
1515
max-width: 300px;
16-
-webkit-box-shadow: 0 0 5px #ddd;
17-
box-shadow: 0 0 5px #ddd;
1816
}
1917
body .ui-tooltip {
2018
border-width: 2px;

ui/tooltip.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,8 @@ return $.widget( "ui.tooltip", {
406406
_tooltip: function( element ) {
407407
var tooltip = $( "<div>" )
408408
.attr( "role", "tooltip" )
409-
.addClass( "ui-tooltip ui-widget ui-corner-all ui-widget-content " +
409+
// TODO move to classes option
410+
.addClass( "ui-tooltip ui-widget ui-widget-shadow ui-corner-all ui-widget-content " +
410411
( this.options.tooltipClass || "" ) ),
411412
id = tooltip.uniqueId().attr( "id" );
412413

0 commit comments

Comments
 (0)