fix separator visibility when items are hidden

This commit is contained in:
Keegan
2016-03-02 23:57:24 +11:00
parent 8e3cd119b8
commit aa8409912c
2 changed files with 21 additions and 12 deletions
+21 -5
View File
@@ -107,9 +107,11 @@ label {
.component { .component {
padding-bottom: $item-spacing-v; padding-bottom: $item-spacing-v;
&.disabled > * { &.disabled {
opacity: 0.25;
pointer-events: none; pointer-events: none;
> * {
opacity: 0.25;
}
} }
} }
@@ -119,7 +121,7 @@ label {
margin-bottom: 1rem; margin-bottom: 1rem;
box-shadow: $color-gray-1 0 0.15rem 0.25rem; box-shadow: $color-gray-1 0 0.15rem 0.25rem;
.component { > .component {
padding-top: $item-spacing-v; padding-top: $item-spacing-v;
padding-right: $item-spacing-h; padding-right: $item-spacing-h;
padding-left: $item-spacing-h; padding-left: $item-spacing-h;
@@ -147,14 +149,28 @@ label {
} }
} }
.component-heading:first-child { // don't show the separator for the first non-hidden item
> .component:not(.hide):after {
display: none;
}
> .component:not(.hide) ~ .component:not(.hide):after {
display: block;
}
> .component-heading:first-child {
background: $color-gray-3; background: $color-gray-3;
border-radius: $border-radius $border-radius 0 0; border-radius: $border-radius $border-radius 0 0;
// don't show the separator for the first non-hidden item after the heading
&:after, &:after,
& + .component:after { ~ .component:not(.hide):after {
display: none; display: none;
} }
~ .component:not(.hide) ~ .component:not(.hide):after {
display: block;
}
} }
} }
-7
View File
@@ -34,14 +34,7 @@ $color-gray-9: #a4a4a4 ;
$color-gray-10: #ececec; $color-gray-10: #ececec;
$color-gray-11: #f2f2f2; $color-gray-11: #f2f2f2;
$global-margin: 55px;
$form-margin: 25px;
$button-padding: 0.7rem; $button-padding: 0.7rem;
$button-padding-ios: 0.6rem; $button-padding-ios: 0.6rem;
$button-line-height: 13px;
$footer-height-large: 90px;
$box-shadow-small-components: $color-gray-1 0 0.1rem 0.1rem; $box-shadow-small-components: $color-gray-1 0 0.1rem 0.1rem;