messager.less 2.3 KB
Newer Older
C
Catouse 已提交
1 2 3 4 5 6 7 8 9 10
/// ========================================================================
/// ZUI: messager.less
/// http://zui.sexy
/// ========================================================================
/// Copyright 2014-2016 cnezsoft.com; Licensed MIT
/// ========================================================================


// Messager style for module messager.js

C
Catouse 已提交
11
.messager {
12
  display: table;
C
Catouse 已提交
13 14 15
  color: @color-light;
  background-color: @color-dark;
  background-color: rgba(0, 0, 0, 0.8);
C
Catouse 已提交
16
  border-radius: @messager-radius;
17 18
  margin: 10px;
  pointer-events: auto;
19
  overflow: hidden;
C
Catouse 已提交
20 21
}

C
Catouse 已提交
22
.messager-content {
23 24 25
  padding: 10px 15px;
  display: table-cell;
  vertical-align: top;
C
Catouse 已提交
26

C
Catouse 已提交
27
  > [class^='icon-'] {
C
Catouse 已提交
28 29 30 31 32
     display: inline-block;
     margin-right: 8px;
  }
}

C
Catouse 已提交
33
.messager-actions {
34 35
  display: table-cell;
  vertical-align: top;
C
Catouse 已提交
36

C
Catouse 已提交
37
  > .action {
C
Catouse 已提交
38
    color: #fafafa;
C
Catouse 已提交
39
    color: rgba(255,255,255,.6);
C
Catouse 已提交
40 41 42
    background: none;
    border: none;
    text-shadow: none;
C
Catouse 已提交
43 44 45 46
    min-width: 40px;
    padding: 0 12px;
    height: 40px;
    text-align: center;
C
Catouse 已提交
47

C
Catouse 已提交
48
    &.close {
C
Catouse 已提交
49
      padding-bottom: 5px;
C
Catouse 已提交
50 51 52 53 54
      opacity: 1;
      font-size: 20px;
      font-weight: normal;
    }

C
Catouse 已提交
55
    &:hover {
C
Catouse 已提交
56
      color: #fff;
C
Catouse 已提交
57
      background: rgba(0,0,0,.1);
C
Catouse 已提交
58
    }
C
Catouse 已提交
59
  }
C
Catouse 已提交
60 61

  .action-icon + .action-text {margin-left: 8px;}
C
Catouse 已提交
62 63
}

64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118
.messagers-holder {
  z-index: 99999;
  position: fixed;
  padding: 10px;
  pointer-events: none;
  .transition-fast(top);

  &.top {
    top: 0;
    
  }

  &.top-left {
    top: 0;
    left: 0;
  }

  &.top-right {
    top: 0;
    right: 0;
  }

  &.bottom {
    bottom: 0;
  }

  &.bottom-left {
    bottom: 0;
    left: 0;
  }

  &.bottom-right {
    bottom: 0;
    right: 0;
  }

  &.top-right,
  &.bottom-right {
    .messager { margin-left: auto; }
  }

  &.center {
    top: 0;
  }

  &.top,
  &.bottom,
  &.center {
    left: 0;
    right: 0;

    .messager { margin: 10px auto; }
  }
}

C
Catouse 已提交
119
.messager-primary {
C
Catouse 已提交
120 121 122
  background-color: @state-primary-inverse-bg;
}

C
Catouse 已提交
123
.messager-success {
C
Catouse 已提交
124 125 126
  background-color: @state-success-inverse-bg;
}

C
Catouse 已提交
127
.messager-info {
C
Catouse 已提交
128 129 130
  background-color: @state-info-inverse-bg;
}

C
Catouse 已提交
131
.messager-warning {
C
Catouse 已提交
132 133 134
  background-color: @state-warning-inverse-bg;
}

C
Catouse 已提交
135
.messager-danger {
C
Catouse 已提交
136 137 138
  background-color: @state-danger-inverse-bg;
}

C
Catouse 已提交
139
.messager-important {
C
Catouse 已提交
140 141 142
  background-color: @state-important-inverse-bg;
}

C
Catouse 已提交
143
.messager-special {
C
Catouse 已提交
144 145 146
  background-color: @state-special-inverse-bg;
}