-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move error state alignment css into mixin
- Loading branch information
Showing
2 changed files
with
92 additions
and
37 deletions.
There are no files selected for viewing
49 changes: 49 additions & 0 deletions
49
playbook/app/pb_kits/playbook/pb_form_group/_error_state_mixin.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,49 @@ | ||
@mixin error-state-flex-start-selectors { | ||
&:has(.pb_text_input_kit.error):has(.pb_text_input_kit), | ||
&:has(.pb_text_input_kit):has(.pb_date_picker_kit.error), | ||
&:has(.pb_text_input_kit):has(.pb_select_kit_wrapper.error), | ||
&:has(.pb_text_input_kit.error):has(.pb_text_input_kit_label):has(.pb_select_kit_wrapper.error) { | ||
align-items: flex-start; | ||
} | ||
} | ||
|
||
@mixin error-state-center-selectors { | ||
&:has(.pb_select_kit_label):has(.pb_select_kit_wrapper.error):has(.pb_phone_number_input), | ||
&:has(.pb_text_input_kit.error):has(.pb_text_input_kit_label):has([class^=pb_button_kit]) { | ||
align-items: center; | ||
} | ||
} | ||
|
||
@mixin error-state-flex-end-selectors { | ||
&:has(.pb_select_kit_label):has(.pb_select_kit_wrapper.error):has(.pb_phone_number_input):has(.pb_text_input_kit.error) { | ||
align-items: flex-end; | ||
} | ||
} | ||
|
||
@mixin error-state-left-side-select-kit { | ||
&:has(.pb_text_input_kit:not(.error)):has(.pb_text_input_kit_label):has(.pb_select_kit_wrapper.error), | ||
&:has(.pb_text_input_kit.error):has(.pb_text_input_kit_label):has(.pb_select_kit_wrapper) { | ||
align-items: flex-start; | ||
|
||
.pb_select_kit_wrapper, | ||
.pb_select_kit_wrapper.error { | ||
padding-top: $space_md; | ||
margin-top: 2px; | ||
|
||
.pb_select_kit_caret { | ||
padding-top: $space_xl; | ||
} | ||
} | ||
} | ||
} | ||
|
||
@mixin error-state-right-side-select-kit { | ||
&:has(.pb_select_kit_label):has(.pb_select_kit_wrapper):has(.pb_phone_number_input):has(.pb_text_input_kit.error) { | ||
align-items: flex-start; | ||
|
||
.pb_text_input_kit.error { | ||
padding-top: $space_md; | ||
margin-top: 2px; | ||
} | ||
} | ||
} |
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