Skip to content

Commit

Permalink
InputGroup: Change border-radius applying (#589)
Browse files Browse the repository at this point in the history
  • Loading branch information
JKMarkowski committed Jan 16, 2020
1 parent 3413503 commit 8a9dc3a
Showing 1 changed file with 19 additions and 63 deletions.
82 changes: 19 additions & 63 deletions src/input-group.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ $fd-input-border-radius: var(--sapField_BorderCornerRadius);
}

.#{$block} {

$fd-input-group-add-on-border: 0.0625rem;

@include fd-reset();

display: flex;
Expand All @@ -36,14 +39,14 @@ $fd-input-border-radius: var(--sapField_BorderCornerRadius);
@include fd-input-group-focus();

> * {
border-radius: $fd-input-border-radius;

&:first-child {
border-radius: $fd-input-border-radius;
border-top-right-radius: 0;
border-bottom-right-radius: 0;
}

&:last-child {
border-radius: $fd-input-border-radius;
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}
Expand All @@ -53,14 +56,14 @@ $fd-input-border-radius: var(--sapField_BorderCornerRadius);
}

@include fd-rtl() {
border-radius: $fd-input-border-radius;

&:first-child {
border-radius: $fd-input-border-radius;
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}

&:last-child {
border-radius: $fd-input-border-radius;
border-top-right-radius: 0;
border-bottom-right-radius: 0;
}
Expand Down Expand Up @@ -151,45 +154,26 @@ $fd-input-border-radius: var(--sapField_BorderCornerRadius);
display: flex;
flex-direction: column;
border: none;
border-radius: $fd-input-border-radius;
border-radius: $fd-input-group-add-on-border;

.#{$block}__button {
@include fd-reset-child-spacing();

border-radius: 0;
height: 100%;
max-height: 100%;
}

> * {
border-radius: 0;
}

&:first-child {
> * {
border-radius: $fd-input-border-radius;
border-top-right-radius: 0;
border-bottom-right-radius: 0;

&:first-child:not(:last-child) {
border-bottom-left-radius: 0;
}

&:last-child:not(:first-child) {
border-top-left-radius: 0;
}
}
border-radius: $fd-input-group-add-on-border 0 0 $fd-input-group-add-on-border;
}

&:last-child {
> * {
border-radius: $fd-input-border-radius;
border-top-left-radius: 0;
border-bottom-left-radius: 0;

&:first-child:not(:last-child) {
border-bottom-right-radius: 0;
}

&:last-child:not(:first-child) {
border-top-right-radius: 0;
}
}
border-radius: 0 $fd-input-group-add-on-border $fd-input-group-add-on-border 0;
}

&:not(:first-child):not(:last-child) {
Expand All @@ -200,41 +184,13 @@ $fd-input-border-radius: var(--sapField_BorderCornerRadius);

@include fd-rtl() {
&:first-child {
> * {
border-radius: $fd-input-border-radius;
border-top-left-radius: 0;
border-bottom-left-radius: 0;
margin-right: 0;
border-top-right-radius: $fd-input-border-radius;
border-bottom-right-radius: $fd-input-border-radius;

&:first-child:not(:last-child) {
border-bottom-right-radius: 0;
}

&:last-child:not(:first-child) {
border-top-right-radius: 0;
}
}
border-radius: 0 $fd-input-group-add-on-border $fd-input-group-add-on-border 0;
margin-right: 0;
}

&:last-child {
> * {
border-radius: $fd-input-border-radius;
border-top-right-radius: 0;
border-bottom-right-radius: 0;
margin-left: 0;
border-top-left-radius: $fd-input-border-radius;
border-bottom-left-radius: $fd-input-border-radius;

&:first-child:not(:last-child) {
border-bottom-left-radius: 0;
}

&:last-child:not(:first-child) {
border-top-left-radius: 0;
}
}
border-radius: $fd-input-group-add-on-border 0 0 $fd-input-group-add-on-border;
margin-left: 0;
}
}
}
Expand Down

0 comments on commit 8a9dc3a

Please sign in to comment.