-
Notifications
You must be signed in to change notification settings - Fork 842
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix focus state regression of icons in EuiFormControlLayout. (#898)
* Fix focus state regression of icons in EuiFormControlLayout. * Refactor EuiFormControlLayout for readability and clarity. * Break up SCSS into multiple files and improve class names. * Normalize DOM structure of EuiFormControlLayoutCustomIcon.
- Loading branch information
Showing
13 changed files
with
390 additions
and
287 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
src/components/form/form_control_layout/_form_control_layout_clear_button.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.euiFormControlLayoutClearButton { | ||
@include euiFormControlLayoutClearIcon('.euiFormControlLayoutClearButton__icon'); | ||
} |
20 changes: 20 additions & 0 deletions
20
src/components/form/form_control_layout/_form_control_layout_custom_icon.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
.euiFormControlLayoutCustomIcon { | ||
pointer-events: none; | ||
} | ||
|
||
.euiFormControlLayoutCustomIcon--clickable { | ||
pointer-events: all; | ||
height: $euiSize; | ||
width: $euiSize; | ||
@include size($euiSize); | ||
|
||
.euiFormControlLayoutCustomIcon__clickableIcon { | ||
vertical-align: baseline; | ||
} | ||
|
||
&:focus { | ||
background: $euiColorPrimary; | ||
border-radius: 100%; | ||
color: $euiColorGhost; | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
src/components/form/form_control_layout/_form_control_layout_icons.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
.euiFormControlLayoutIcons { | ||
pointer-events: none; | ||
position: absolute; | ||
top: 0; | ||
bottom: 0; | ||
left: $euiFormControlPadding; | ||
display: flex; | ||
align-items: center; | ||
|
||
> * + * { | ||
margin-left: $euiFormControlPadding; | ||
} | ||
} | ||
|
||
.euiFormControlLayoutIcons--right { | ||
left: auto; | ||
right: $euiFormControlPadding; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
@import 'mixins'; | ||
@import 'form_control_layout'; | ||
@import 'form_control_layout_icons'; | ||
@import 'form_control_layout_clear_button'; | ||
@import 'form_control_layout_custom_icon'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.