Permalink
Browse files

Deprecated option shadowicon. Add class ui-shadow-icon to a container…

… or an button instead.
  • Loading branch information...
jaspermdegroot committed May 21, 2013
1 parent 1324c7a commit 4e864beb25e7d389b2d990f39eecf84b441a88cd
@@ -35,30 +35,6 @@ legend,
text-decoration: none;
}
-/* Shadow
------------------------------------------------------------------------------------------------------------*/
-
-.ui-shadow {
- -webkit-box-shadow: 0 1px 3px /*{global-box-shadow-size}*/ rgba(0,0,0,.2) /*{global-box-shadow-color}*/;
- -moz-box-shadow: 0 1px 3px /*{global-box-shadow-size}*/ rgba(0,0,0,.2) /*{global-box-shadow-color}*/;
- box-shadow: 0 1px 3px /*{global-box-shadow-size}*/ rgba(0,0,0,.2) /*{global-box-shadow-color}*/
-}
-.ui-shadow-inset {
- -webkit-box-shadow: inset 0 1px 3px /*{global-box-shadow-size}*/ rgba(0,0,0,.2) /*{global-box-shadow-color}*/;
- -moz-box-shadow: inset 0 1px 3px /*{global-box-shadow-size}*/ rgba(0,0,0,.2) /*{global-box-shadow-color}*/;
- box-shadow: inset 0 1px 3px 0 1px 3px /*{global-box-shadow-size}*/ rgba(0,0,0,.2) /*{global-box-shadow-color}*/;
-}
-.ui-shadow-icon:after {
- -webkit-box-shadow: 0 1px 0 rgba(255,255,255,.3) /*{global-icon-shadow}*/;
- -moz-box-shadow: 0 1px 0 rgba(255,255,255,.3) /*{global-icon-shadow}*/;
- box-shadow: 0 1px 0 rgba(255,255,255,.3) /*{global-icon-shadow}*/;
-}
-.ui-overlay-shadow {
- -webkit-box-shadow: 0 0 12px rgba(0,0,0,.6);
- -moz-box-shadow: 0 0 12px rgba(0,0,0,.6);
- box-shadow: 0 0 12px rgba(0,0,0,.6);
-}
-
/* Corner rounding
-----------------------------------------------------------------------------------------------------------*/
@@ -95,6 +71,25 @@ legend,
background-clip: padding-box;
}
+/* Shadow
+-----------------------------------------------------------------------------------------------------------*/
+
+.ui-shadow {
+ -webkit-box-shadow: 0 1px 3px /*{global-box-shadow-size}*/ rgba(0,0,0,.2) /*{global-box-shadow-color}*/;
+ -moz-box-shadow: 0 1px 3px /*{global-box-shadow-size}*/ rgba(0,0,0,.2) /*{global-box-shadow-color}*/;
+ box-shadow: 0 1px 3px /*{global-box-shadow-size}*/ rgba(0,0,0,.2) /*{global-box-shadow-color}*/
+}
+.ui-shadow-inset {
+ -webkit-box-shadow: inset 0 1px 3px /*{global-box-shadow-size}*/ rgba(0,0,0,.2) /*{global-box-shadow-color}*/;
+ -moz-box-shadow: inset 0 1px 3px /*{global-box-shadow-size}*/ rgba(0,0,0,.2) /*{global-box-shadow-color}*/;
+ box-shadow: inset 0 1px 3px 0 1px 3px /*{global-box-shadow-size}*/ rgba(0,0,0,.2) /*{global-box-shadow-color}*/;
+}
+.ui-overlay-shadow {
+ -webkit-box-shadow: 0 0 12px rgba(0,0,0,.6);
+ -moz-box-shadow: 0 0 12px rgba(0,0,0,.6);
+ box-shadow: 0 0 12px rgba(0,0,0,.6);
+}
+
/* Icons
-----------------------------------------------------------------------------------------------------------*/
@@ -109,7 +104,7 @@ legend,
}
/* Alt icon color */
-.ui-btn.ui-icon-alt:after,
+.ui-icon-alt.ui-btn:after,
.ui-icon-alt .ui-btn[class*="ui-icon-"]:after,
.ui-icon-alt .ui-input-search:after {
background-color: #fff;
@@ -119,12 +114,20 @@ legend,
}
/* No disc */
-.ui-btn.ui-icon-nodisc:after,
+.ui-icon-nodisc.ui-btn:after,
.ui-icon-nodisc .ui-btn[class*="ui-icon-"]:after,
.ui-icon-nodisc .ui-input-search:after {
background-color: transparent;
}
+/* Icon shadow */
+.ui-shadow-icon.ui-btn:after,
+.ui-shadow-icon .ui-btn[class*="ui-icon-"]:after {
+ -webkit-box-shadow: 0 1px 0 rgba(255,255,255,.3) /*{global-icon-shadow}*/;
+ -moz-box-shadow: 0 1px 0 rgba(255,255,255,.3) /*{global-icon-shadow}*/;
+ box-shadow: 0 1px 0 rgba(255,255,255,.3) /*{global-icon-shadow}*/;
+}
+
/* Icon sprite */
.ui-icon-plus:after {
@@ -21,7 +21,7 @@ var reverseBoolOptionMap = {
"ui-shadow" : "shadow",
"ui-corner-all" : "corners",
"ui-btn-inline" : "inline",
- "ui-shadow-icon" : "iconshadow",
+ "ui-shadow-icon" : "iconshadow", /* TODO: Remove in 1.5 */
"ui-mini" : "mini"
};
@@ -52,7 +52,7 @@ function optionsToClasses( options, existingClasses ) {
"ui-btn-icon-" + options.iconpos
]);
if ( options.iconshadow ) {
- classes.push( "ui-shadow-icon" );
+ classes.push( "ui-shadow-icon" ); /* TODO: Remove in 1.5 */
}
}
@@ -220,7 +220,7 @@ $.fn.buttonMarkup.defaults = {
inline: false,
shadow: true,
corners: true,
- iconshadow: true,
+ iconshadow: false, /* TODO: Remove in 1.5. Option deprecated in 1.4. */
mini: false
};
@@ -249,7 +249,7 @@ function enhanceWithButtonMarkup( idx, el ) {
inline : getAttrFixed( el, "inline", true ),
shadow : getAttrFixed( el, "shadow", true ),
corners : getAttrFixed( el, "corners", true ),
- iconshadow: getAttrFixed( el, "iconshadow", true ),
+ iconshadow: getAttrFixed( el, "iconshadow", true ), /* TODO: Remove in 1.5 */
mini : getAttrFixed( el, "mini", true )
}), el.className.split( " " ) ).sort();
@@ -14,7 +14,7 @@ $.widget( "mobile.button", $.mobile.widget, {
theme: null,
icon: null,
iconpos: null,
- iconshadow: true,
+ iconshadow: false, /* TODO: Deprecated in 1.4, remove in 1.5. */
corners: true,
shadow: true,
inline: null,
@@ -30,14 +30,10 @@ $.widget( "mobile.button", $.mobile.widget, {
if ( isInput ) {
classes += " ui-input-btn";
- // TODO: When we have time to test thoroughly--any classes manually applied to the original element should be carried over to the enhanced element, with an `-enhanced` suffix. See https://github.com/jquery/jquery-mobile/issues/3577
- /* if ( $el[0].className.length ) {
- classes = $el[0].className;
- } */
+ // TODO: data-class and data-id options. See https://github.com/jquery/jquery-mobile/issues/3577
if ( !!~$el[ 0 ].className.indexOf( "ui-btn-left" ) ) {
classes += " ui-btn-left";
}
-
if ( !!~$el[ 0 ].className.indexOf( "ui-btn-right" ) ) {
classes += " ui-btn-right";
}
@@ -125,6 +121,7 @@ $.widget( "mobile.button", $.mobile.widget, {
$el.attr( "title", text );
}
+ /* TODO: Remove in 1.5. */
if ( o.iconshadow ) {
classes += " ui-shadow-icon";
}
@@ -18,7 +18,7 @@ $.widget( "mobile.selectmenu", $.mobile.widget, $.extend( {
inline: false,
corners: true,
shadow: true,
- iconshadow: true,
+ iconshadow: false, /* TODO: Deprecated in 1.4, remove in 1.5. */
overlayTheme: null,
dividerTheme: null,
hidePlaceholderMenuItems: true,
@@ -112,11 +112,8 @@ $.widget( "mobile.selectmenu", $.mobile.widget, $.extend( {
button = this.button
.insertBefore( this.select )
.addClass( "ui-btn" +
- ( options.icon ?
- ( " ui-icon-" + options.icon + " ui-btn-icon-" + iconpos + ( options.iconshadow ?
- " ui-shadow-icon" :
- "" ) ) :
- "" ) +
+ ( options.icon ? ( " ui-icon-" + options.icon + " ui-btn-icon-" + iconpos +
+ ( options.iconshadow ? " ui-shadow-icon" : "" ) ) : "" ) + /* TODO: Remove in 1.5. */
( options.theme ? " ui-btn-" + options.theme : "" ) +
( options.corners ? " ui-corner-all" : "" ) +
( options.shadow ? " ui-shadow" : "" ) );

0 comments on commit 4e864be

Please sign in to comment.