Skip to content

Commit

Permalink
fix: add delta theming for Forms (#1996)
Browse files Browse the repository at this point in the history
* forms input

* inputs

* forms message
  • Loading branch information
katekozlowska committed Jan 4, 2021
1 parent fbc6e2e commit 5ba3859
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/form-message.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ $block: #{$fd-namespace}-form-message;
line-height: normal;
color: var(--sapTextColor);
white-space: pre-line !important;
box-shadow: var(--sapContent_Shadow1);
box-shadow: var(--fdMessage_Box_Shadow);
border: var(--fdMessage_Border);

@include fd-rtl() {
right: 0;
Expand Down
5 changes: 5 additions & 0 deletions src/mixins/_forms.scss
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
&.is-error {
background-color: var(--sapField_InvalidBackground);
border-color: var(--sapField_InvalidColor);
font-style: var(--fdInput_State_Text_Style);
font-weight: var(--fdInput_State_Font_Weight);

@include fd-hover() {
background-color: var(--sapField_InvalidBackground);
Expand All @@ -38,6 +40,8 @@
&.is-alert {
background-color: var(--sapField_WarningBackground);
border-color: var(--sapField_WarningColor);
font-style: var(--fdInput_State_Text_Style);
font-weight: var(--fdInput_State_Font_Weight);

@include fd-hover() {
background-color: var(--sapField_WarningBackground);
Expand Down Expand Up @@ -68,6 +72,7 @@
&.is-information,
&.is-error {
border-width: $fd-form-border-thick-width;
border-style: var(--fdInput_State_Border_Type);

@include fd-focus() {
box-shadow: none;
Expand Down
8 changes: 8 additions & 0 deletions src/theming/sap_fiori_3.scss
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,14 @@

/* Input */
--fdInput_Text_Shadow: none;
--fdInput_State_Text_Style: normal;
--fdInput_State_Font_Weight: normal;
--fdInput_State_Border_Type: solid;
--fdPlaceholder_Text_Style: normal;

/* Form Message */
--fdMessage_Box_Shadow: var(--sapContent_Shadow1);
--fdMessage_Border: none;

/* Calendar */
--fdCalendar_Text_Shadow: none;
Expand Down
7 changes: 7 additions & 0 deletions src/theming/sap_fiori_3_dark.scss
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,13 @@

/* Input */
--fdInput_Text_Shadow: none;
--fdInput_State_Text_Style: normal;
--fdInput_State_Font_Weight: normal;
--fdInput_State_Border_Type: solid;

/* Form Message */
--fdMessage_Box_Shadow: var(--sapContent_Shadow1);
--fdMessage_Border: none;

/* Calendar */
--fdCalendar_Text_Shadow: none;
Expand Down
7 changes: 7 additions & 0 deletions src/theming/sap_fiori_3_hcb.scss
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,13 @@

/* Input */
--fdInput_Text_Shadow: 0 0 0.125rem #000;
--fdInput_State_Text_Style: italic;
--fdInput_State_Font_Weight: bold;
--fdInput_State_Border_Type: dashed;

/* Form Message */
--fdMessage_Box_Shadow: none;
--fdMessage_Border: calc(2 * var(--sapField_BorderWidth)) solid var(--sapField_BorderColor);

/* Calendar */
--fdCalendar_Text_Shadow: 0 0 0.125rem #000;
Expand Down
7 changes: 7 additions & 0 deletions src/theming/sap_fiori_3_hcw.scss
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,13 @@

/* Input */
--fdInput_Text_Shadow: none;
--fdInput_State_Text_Style: italic;
--fdInput_State_Font_Weight: bold;
--fdInput_State_Border_Type: dashed;

/* Form Message */
--fdMessage_Box_Shadow: none;
--fdMessage_Border: calc(2 * var(--sapField_BorderWidth)) solid var(--sapField_BorderColor);

/* Calendar */
--fdCalendar_Text_Shadow: none;
Expand Down
7 changes: 7 additions & 0 deletions src/theming/sap_fiori_3_light_dark.scss
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,13 @@

/* Input */
--fdInput_Text_Shadow: none;
--fdInput_State_Text_Style: normal;
--fdInput_State_Font_Weight: normal;
--fdInput_State_Border_Type: solid;

/* Form Message */
--fdMessage_Box_Shadow: var(--sapContent_Shadow1);
--fdMessage_Border: none;

/* Calendar */
--fdCalendar_Text_Shadow: none;
Expand Down

0 comments on commit 5ba3859

Please sign in to comment.