Skip to content
This repository has been archived by the owner on Dec 8, 2022. It is now read-only.

Popover adjustments #1218

Merged
merged 9 commits into from
Oct 20, 2017
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
.sky-popover-container {
position: static !important;
opacity: 1 !important;
visibility: visible !important;
}
}

Expand Down
1 change: 1 addition & 0 deletions src/app/components/popover/popover-demo.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
position: static !important;
width: 100% !important;
opacity: 1 !important;
visibility: visible !important;

.sky-popover {
margin: 0;
Expand Down
2 changes: 1 addition & 1 deletion src/modules/popover/popover.component.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="sky-popover-container hidden"
<div class="sky-popover-container"
[ngClass]="'sky-popover-placement-' + placement"
(@popoverState.start)="onAnimationStart($event)"
(@popoverState.done)="onAnimationDone($event)"
Expand Down
7 changes: 2 additions & 5 deletions src/modules/popover/popover.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,11 @@ $popover-max-width: 276px;
}

.sky-popover-container {
visibility: hidden;
opacity: 0;
position: absolute;
z-index: 9999;

&.hidden {
left: -99999px !important;
right: auto !important;
}

@media (max-width: $sky-screen-xs-max) {
left: 0 !important;
right: 0;
Expand Down
2 changes: 1 addition & 1 deletion src/modules/popover/popover.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ describe('SkyPopoverComponent', () => {
document.dispatchEvent(escapeEvent);

fixture.detectChanges();
const element = fixture.debugElement.query(By.css('.sky-popover-container.hidden'));
const element = fixture.debugElement.query(By.css('.sky-popover-container'));

expect(component.close).toHaveBeenCalled();
expect(element.nativeElement).toBeDefined();
Expand Down
2 changes: 1 addition & 1 deletion src/modules/popover/popover.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import { SkyPopoverPlacement, SkyPopoverAdapterService } from './index';
providers: [SkyPopoverAdapterService],
animations: [
trigger('popoverState', [
state('visible', style({ opacity: 1 })),
state('visible', style({ opacity: 1, visibility: 'visible' })),
state('hidden', style({ opacity: 0 })),
transition('hidden => visible', animate('150ms')),
transition('visible => hidden', animate('150ms'))
Expand Down