Skip to content

Commit

Permalink
Button: Removed line-height from .ui-button-text. Fixed #7966 - Submi…
Browse files Browse the repository at this point in the history
…t button height inconsistent with other buttons
  • Loading branch information
tjvantoll committed Jan 18, 2012
1 parent eee63a2 commit 8b63a94
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
9 changes: 8 additions & 1 deletion tests/unit/button/button.html
Expand Up @@ -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",
Expand Down Expand Up @@ -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>
9 changes: 9 additions & 0 deletions tests/unit/button/button_tickets.js
Expand Up @@ -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 );
2 changes: 1 addition & 1 deletion themes/base/jquery.ui.button.css
Expand Up @@ -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; }
Expand Down

0 comments on commit 8b63a94

Please sign in to comment.