Skip to content

Commit

Permalink
Set Button component to display: inline-block. (#9542)
Browse files Browse the repository at this point in the history
Backports PR #9541

**Commit 1:**
Set Button component to display: inline-block, to ensure it has the same height when applied to both button elements and anchor tags.

* Original sha: 719598c
* Authored by CJ Cenizal <[email protected]> on 2016-12-16T23:56:29Z
  • Loading branch information
elastic-jasper authored and cjcenizal committed Dec 16, 2016
1 parent ef40953 commit 6806477
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
7 changes: 5 additions & 2 deletions src/ui_framework/components/button/_button.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
/**
* 1. Disable for Angular.
* 1. Setting to inline-block guarantees the same height when applied to both
* button elements and anchor tags.
* 2. Disable for Angular.
*/
.kuiButton {
display: inline-block; /* 1 */
appearance: none;
padding: 4px 12px 5px;
font-size: $fontSize;
Expand All @@ -14,7 +17,7 @@

&:disabled {
cursor: default;
pointer-events: none; // 1
pointer-events: none; /* 2 */
}

&:active:enabled {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,12 @@
Button element
</button>

<hr class="guideBreak">

<input
type="submit"
class="kuiButton kuiButton--basic"
value="Submit input element"
>

<hr class="guideBreak">

<a href="#" class="kuiButton kuiButton--basic">
Anchor element
</a>

0 comments on commit 6806477

Please sign in to comment.