Skip to content

Commit

Permalink
Fixing form layout icon vertical alignment (#904)
Browse files Browse the repository at this point in the history
  • Loading branch information
cchaos authored Jun 5, 2018
1 parent c4f7fd8 commit d26552f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ exports[`EuiFormControlLayout props icon is rendered as a string 1`] = `
>
<svg
aria-hidden="true"
class="euiIcon euiIcon--medium"
class="euiIcon euiIcon--medium euiFormControlLayoutCustomIcon__icon"
focusable="false"
height="16"
viewBox="0 0 16 16"
Expand Down Expand Up @@ -101,7 +101,7 @@ exports[`EuiFormControlLayout props icon is rendered as an object 1`] = `
>
<svg
aria-hidden="true"
class="euiIcon euiIcon--medium"
class="euiIcon euiIcon--medium euiFormControlLayoutCustomIcon__icon"
focusable="false"
height="16"
viewBox="0 0 16 16"
Expand Down Expand Up @@ -136,7 +136,7 @@ exports[`EuiFormControlLayout props icon side left is rendered 1`] = `
>
<svg
aria-hidden="true"
class="euiIcon euiIcon--medium"
class="euiIcon euiIcon--medium euiFormControlLayoutCustomIcon__icon"
focusable="false"
height="16"
viewBox="0 0 16 16"
Expand Down Expand Up @@ -171,7 +171,7 @@ exports[`EuiFormControlLayout props icon side right is rendered 1`] = `
>
<svg
aria-hidden="true"
class="euiIcon euiIcon--medium"
class="euiIcon euiIcon--medium euiFormControlLayoutCustomIcon__icon"
focusable="false"
height="16"
viewBox="0 0 16 16"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
.euiFormControlLayoutCustomIcon {
pointer-events: none;

.euiFormControlLayoutCustomIcon__icon {
transform: translateY(-1px);
}
}

.euiFormControlLayoutCustomIcon--clickable {
pointer-events: all;
@include size($euiSize);

.euiFormControlLayoutCustomIcon__clickableIcon {
.euiFormControlLayoutCustomIcon__icon {
vertical-align: baseline;
transform: none;
}

&:focus {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const EuiFormControlLayoutCustomIcon = ({
{...rest}
>
<EuiIcon
className="euiFormControlLayoutCustomIcon__clickableIcon"
className="euiFormControlLayoutCustomIcon__icon"
aria-hidden="true"
type={type}
/>
Expand All @@ -43,6 +43,7 @@ export const EuiFormControlLayoutCustomIcon = ({
{...rest}
>
<EuiIcon
className="euiFormControlLayoutCustomIcon__icon"
aria-hidden="true"
type={type}
/>
Expand Down

0 comments on commit d26552f

Please sign in to comment.