Skip to content

Commit

Permalink
Merge pull request #10456 from gskaplan/hotfix/input-group-buttons-si…
Browse files Browse the repository at this point in the history
…zing

Issue 10416 - input-group buttons not sized properly
  • Loading branch information
kball committed Aug 4, 2017
2 parents b475373 + 1eb2a62 commit e1a21b2
Show file tree
Hide file tree
Showing 3 changed files with 84 additions and 2 deletions.
11 changes: 9 additions & 2 deletions scss/forms/_input-group.scss
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ $input-prefix-padding: 1rem !default;
text-align: center;

@if $global-flexbox {
display: flex;
flex: 0 0 auto;
}
@else {
Expand All @@ -118,10 +119,16 @@ $input-prefix-padding: 1rem !default;
button,
label {
@extend %input-group-child;
height: $height;

@if $global-flexbox {
height: auto;
align-self: stretch;
}
@else {
height: $height;
}
padding-top: 0;
padding-bottom: 0;

font-size: $input-font-size;
}
}
Expand Down
35 changes: 35 additions & 0 deletions test/visual/form/input-group-float.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<!doctype html>
<!--[if IE 9]><html class="lt-ie10" lang="en" > <![endif]-->
<html class="no-js" lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<title>Foundation for Sites Testing</title>
<link href="../motion-ui/dist/motion-ui.css" rel="stylesheet" />
<link href="../assets/css/foundation-float.css" rel="stylesheet" />
</head>
<body>

<div class="row column">
<h3>FLOAT Control Group: input-group height &amp; vertical alignment.</h3>
<p>Assure that all controls are flush at the top and bottom. Pay special
attention to the Submit button.</p>
</div>
<div class="medium-4 column">
<div class="input-group">
<span class="input-group-label">$</span>
<input class="input-group-field" type="number">
<div class="input-group-button">
<input type="submit" class="button" value="Submit">
</div>
</div>
</div>

<script src="../assets/js/vendor.js"></script>
<script src="../assets/js/foundation.js"></script>
<script>
$(document).foundation();
</script>
</body>
</html>
40 changes: 40 additions & 0 deletions test/visual/form/input-group-xygrid.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<!doctype html>
<!--[if IE 9]><html class="lt-ie10" lang="en" > <![endif]-->
<html class="no-js" lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<title>Foundation for Sites Testing</title>
<link href="../motion-ui/dist/motion-ui.css" rel="stylesheet" />
<link href="../assets/css/foundation.css" rel="stylesheet" />

</head>
<body>

<div class="grid-container">
<div class="grid-x grid-padding-x">
<div class="medium-12 cell">
<h3>XY Grid-Control Group: input-group height &amp; vertical alignment.</h3>
<p>Assure that all controls are flush at the top and bottom. Pay special
attention to the Submit button.</p>
</div>
<div class="medium-4 cell">
<div class="input-group">
<span class="input-group-label">$</span>
<input class="input-group-field" type="number">
<div class="input-group-button">
<input type="submit" class="button" value="Submit">
</div>
</div>
</div>
</div>
</div>

<script src="../assets/js/vendor.js"></script>
<script src="../assets/js/foundation.js"></script>
<script>
$(document).foundation();
</script>
</body>
</html>

0 comments on commit e1a21b2

Please sign in to comment.