Button: Removed line-height from .ui-button-text. Fixed #7966 - Submit button height inconsistent with other buttons #576

Closed
wants to merge 1 commit into from
View
9 tests/unit/button/button.html
@@ -8,7 +8,7 @@
<script src="../../resource_loader.js"></script>
<script>
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 @@ <h2 id="qunit-userAgent"></h2>
<div><input id="submit" type="submit" value="Label"></div>
+<!-- Markup for #7966 -->
+<div>
+ <input type="submit" id="submitButtonNode" value="A" />
+ <button id="buttonNode">A</button>
+ <a id="anchorNode" href="#">A</a>
+</div>
+
</div>
</body>
</html>
View
9 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 );
View
2 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; }