From 8b63a941c09d5c13bb7c57b1b31a9caeee286814 Mon Sep 17 00:00:00 2001 From: TJ VanToll Date: Wed, 18 Jan 2012 11:58:05 -0500 Subject: [PATCH] Button: Removed line-height from .ui-button-text. Fixed #7966 - Submit button height inconsistent with other buttons --- tests/unit/button/button.html | 9 ++++++++- tests/unit/button/button_tickets.js | 9 +++++++++ themes/base/jquery.ui.button.css | 2 +- 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/tests/unit/button/button.html b/tests/unit/button/button.html index 5ec7e316afb..cbc1a31bc80 100644 --- a/tests/unit/button/button.html +++ b/tests/unit/button/button.html @@ -8,7 +8,7 @@ loadResources({ - css: [ "ui.core", "ui.button" ], + css: [ "ui.core", "ui.button", "ui.theme" ], js: [ "ui/jquery.ui.core.js", "ui/jquery.ui.widget.js", @@ -66,6 +66,13 @@

+ +
+ + + A +
+ diff --git a/tests/unit/button/button_tickets.js b/tests/unit/button/button_tickets.js index 624d16716b0..08ec8384152 100644 --- a/tests/unit/button/button_tickets.js +++ b/tests/unit/button/button_tickets.js @@ -56,4 +56,13 @@ test( "#7534 - Button label selector works for ids with \":\"", function() { ok( group.find( "label" ).is( ".ui-button" ), "Found an id with a :" ); }); +test( "#7966 - Submit buttons should be the same height as button nodes", function() { + var buttonNode = $( "#buttonNode" ).button(), + submitButtonNode = $( "#submitButtonNode" ).button(), + anchorNode = $( "#anchorNode" ).button(); + + equals( submitButtonNode.outerHeight(), buttonNode.outerHeight(), "input[type=submit] same height as button" ); + equals( submitButtonNode.outerHeight(), anchorNode.outerHeight(), "input[type=submit] same height as anchor"); +}); + })( jQuery ); diff --git a/themes/base/jquery.ui.button.css b/themes/base/jquery.ui.button.css index 2ae50afd111..9da6b43a75c 100644 --- a/themes/base/jquery.ui.button.css +++ b/themes/base/jquery.ui.button.css @@ -14,7 +14,7 @@ button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a l button.ui-button-icons-only { width: 3.7em; } /*button text element */ -.ui-button .ui-button-text { display: block; line-height: 1.4; } +.ui-button .ui-button-text { display: block; } .ui-button-text-only .ui-button-text { padding: .4em 1em; } .ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; } .ui-button-text-icon-primary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; }