summaryrefslogtreecommitdiff
path: root/www/lib/ionic-content-banner/scss/ionic.content.banner.scss
blob: af57ea9f4edbabf25c8fd533bac6b03e218e6144 (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
69
70
71
// Content Banner

// Variables
//-----------------------------------

$content-banner-height: 30px    !default;
$content-banner-opacity: .7     !default;
$content-banner-error-bg: red   !default;
$content-banner-info-bg: #333   !default;

// Styles
//-----------------------------------

.content-banner {
  width: 100%;
  color: white;
  height: $content-banner-height;
  line-height: $content-banner-height;
  position: absolute;
  top: 0;
  opacity: $content-banner-opacity;

  &.error {
    background-color: $content-banner-error-bg;
  }
  &.info {
    background-color: $content-banner-info-bg;
  }
  .content-banner-text {
    @include transition(opacity 500ms linear) ;
    position: absolute;
    top: 0;
    right: ($button-padding * 2) + 5px + 12px;
    left: ($button-padding * 2) + 5px + 12px;
    text-align: center;
    &.active {
      opacity: 1;
    }
    &:not(.active){
      opacity: 0;
    }
  }
  .content-banner-close {
    position: absolute;
    right: 5px;
    top: 0;
    padding: 0 $button-padding;
    height: 100%;
    line-height: $content-banner-height;
    min-height: 0;
    color: white;
    &:before {
      line-height: $content-banner-height;
    }
  }
}

.content-banner-transition-vertical {
  @include transition-transform(linear 250ms);
  @include translate3d(0, -100%, 0);
}

.content-banner-transition-fade {
  @include transition(opacity 400ms linear) ;
  opacity: 0;
}

.content-banner-in {
  @include translate3d(0, 0, 0);
  opacity: $content-banner-opacity;
}