Skip to content

Commit

Permalink
Fix checkbox click for checkboxes without a label.
Browse files Browse the repository at this point in the history
  • Loading branch information
arkwright committed Mar 19, 2018
1 parent e0604ee commit 384f291
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/components/form/checkbox/_checkbox.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,14 @@
position: relative;

.euiCheckbox__input {
@include euiScreenReaderOnly;
opacity: 0;
overflow: hidden;
position: absolute;
z-index: 1;
top: 4px;
width: $euiCheckBoxSize;
height: $euiCheckBoxSize;
cursor: pointer;

~ .euiCheckbox__label {
display: block;
Expand All @@ -17,6 +24,7 @@
+ .euiCheckbox__square {
display: inline-block;
position: absolute;
z-index: 0;
left: 0;
top: ($euiSizeL - $euiCheckBoxSize)/2;
@include euiCustomControl($type: 'square', $size: $euiCheckBoxSize);
Expand Down

0 comments on commit 384f291

Please sign in to comment.