summaryrefslogtreecommitdiffstats
path: root/afb-client/bower_components/foundation-apps/scss/components/_popup.scss
blob: 03403d687754e558bd04f4a9f4a13734f926cad8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
/*
  POPUP
  -----

  A floating container that can anchor to any other on-screen element, and contain any content, including grid blocks or panels.
*/

/// @Foundation.settings
// Popup
$popup-width: rem-calc(300) !default;
$popup-background: #fff !default;
$popup-border: 0 !default;
$popup-radius: 0 !default;
$popup-shadow: 0 0 10px rgba(#000, 0.25) !default;
///

%popup {
  position: absolute;
  z-index: 1000;
  opacity: 0;
  overflow: hidden;
  transition: opacity 0.25s ease-out;
  pointer-events: none;

  &.tether-enabled {
    opacity: 1;
    pointer-events: auto;
  }
}

@mixin popup-layout(
  $width: $popup-width
) {
  width: $popup-width;
}
@mixin popup-style(
  $background: $popup-background,
  $color: #000,
  $radius: $popup-radius,
  $shadow: $popup-shadow,
  $border: $popup-border
) {
  background: $background;
  border-radius: $radius;
  box-shadow: $shadow;
  border: $border;
}

@mixin popup(
  $width: $popup-width,
  $background: $popup-background,
  $radius: $popup-radius,
  $shadow: $popup-shadow,
  $border: $popup-border
) {
  @extend %popup;
  @include popup-layout($width);
  @include popup-style($background, isitlight($background), $radius, $shadow, $border);
}

@include exports(popup) {
  .popup {
    @include popup;

    &.dark    { @include popup-style($dark-color, #fff); }
    &.primary { @include popup-style($primary-color, isitlight($primary-color)); }
  }
}