Skip to content
Prev Previous commit
Next Next commit
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.
  • Loading branch information
jzaefferer committed Jan 22, 2015
commit a2db6209ca77c901b0195683d330d1d8c935bb12
8 changes: 2 additions & 6 deletions themes/base/theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -401,10 +401,6 @@
filter: Alpha(Opacity=30)/*{opacityFilterOverlay}*/; /* support: IE8 */
}
.ui-widget-shadow {
margin: -8px/*{offsetTopShadow}*/ 0 0 -8px/*{offsetLeftShadow}*/;
padding: 8px/*{thicknessShadow}*/;
background: #aaaaaa/*{bgColorShadow}*/ url("images/ui-bg_flat_0_aaaaaa_40x100.png")/*{bgImgUrlShadow}*/ 50%/*{bgShadowXPos}*/ 50%/*{bgShadowYPos}*/ repeat-x/*{bgShadowRepeat}*/;
opacity: .3/*{opacityShadow}*/;
filter: Alpha(Opacity=30)/*{opacityFilterShadow}*/; /* support: IE8 */
border-radius: 8px/*{cornerRadiusShadow}*/;
-webkit-box-shadow: 0/*{offsetLeftShadow}*/ 0/*{offsetTopShadow}*/ 5px/*{thicknessShadow}*/ #ddd/*{bgColorShadow}*/;
box-shadow: 0/*{offsetLeftShadow}*/ 0/*{offsetTopShadow}*/ 5px/*{thicknessShadow}*/ #ddd/*{bgColorShadow}*/;
}
2 changes: 0 additions & 2 deletions themes/base/tooltip.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
position: absolute;
z-index: 9999;
max-width: 300px;
-webkit-box-shadow: 0 0 5px #ddd;
box-shadow: 0 0 5px #ddd;
}
body .ui-tooltip {
border-width: 2px;
Expand Down
3 changes: 2 additions & 1 deletion ui/tooltip.js
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,8 @@ return $.widget( "ui.tooltip", {
_tooltip: function( element ) {
var tooltip = $( "<div>" )
.attr( "role", "tooltip" )
.addClass( "ui-tooltip ui-widget ui-corner-all ui-widget-content " +
// TODO move to classes option
.addClass( "ui-tooltip ui-widget ui-widget-shadow ui-corner-all ui-widget-content " +
( this.options.tooltipClass || "" ) ),
id = tooltip.uniqueId().attr( "id" );

Expand Down