Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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