Skip to content

Commit

Permalink
Bunch more conditions for complex controls.
Browse files Browse the repository at this point in the history
  • Loading branch information
daveyholler committed Jul 28, 2020
1 parent 15d87fe commit 2d5ba08
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 1 deletion.
30 changes: 30 additions & 0 deletions src/themes/eui-amsterdam/overrides/_form_control_layout.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,33 @@
.euiFormControlLayout--group {
border-radius: $euiBorderRadius;

.euiFormControlLayout__childrenWrapper:nth-child(2) [class*='euiField'],
.euiFormControlLayout__childrenWrapper:nth-child(3) [class*='euiField'] {
border-radius: 0;
}

.euiFormControlLayout__childrenWrapper:first-child [class*='euiField'] {
border-radius: $euiBorderRadius 0 0 $euiBorderRadius;
}

.euiFormControlLayout__childrenWrapper:last-child [class*='euiField'] {
border-radius: 0 $euiBorderRadius $euiBorderRadius 0;
}

&.euiFormControlLayout--compressed {
border-radius: $euiBorderRadiusSmall;

.euiFormControlLayout__childrenWrapper:nth-child(2) [class*='euiField'],
.euiFormControlLayout__childrenWrapper:nth-child(3) [class*='euiField'] {
border-radius: 0;
}

.euiFormControlLayout__childrenWrapper:first-child [class*='euiField'] {
border-radius: $euiBorderRadiusSmall 0 0 $euiBorderRadiusSmall;
}

.euiFormControlLayout__childrenWrapper:last-child [class*='euiField'] {
border-radius: 0 $euiBorderRadiusSmall $euiBorderRadiusSmall 0;
}
}
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,41 @@
.euiFormControlLayoutDelimited {
border-radius: $euiBorderRadius;

.euiFormControlLayout__childrenWrapper {
&.euiFormControlLayout--group {
.euiFormControlLayout__childrenWrapper:first-child {
border-radius: $euiBorderRadius 0 0 $euiBorderRadius;
}
}

.euiFormControlLayout__childrenWrapper:only-child {
border-radius: $euiBorderRadius;
overflow: hidden;
}

.euiFormControlLayout__prepend +
.euiFormControlLayout__childrenWrapper {
&:last-child {
border-radius: 0 $euiBorderRadius $euiBorderRadius 0;
}
}

&.euiFormControlLayout--compressed {
&.euiFormControlLayout--group {
.euiFormControlLayout__childrenWrapper:first-child {
border-radius: $euiBorderRadiusSmall 0 0 $euiBorderRadiusSmall;
}
}

.euiFormControlLayout__childrenWrapper:only-child {
border-radius: $euiBorderRadiusSmall;
overflow: hidden;
}

.euiFormControlLayout__prepend +
.euiFormControlLayout__childrenWrapper {
&:last-child {
border-radius: 0 $euiBorderRadiusSmall $euiBorderRadiusSmall 0;
}
}
}
}

0 comments on commit 2d5ba08

Please sign in to comment.