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;
C
Catouse 已提交
19 20
}

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

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

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

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

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

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

  .action-icon + .action-text {margin-left: 8px;}
C
Catouse 已提交
61 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
.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 已提交
118
.messager-primary {
C
Catouse 已提交
119 120 121
  background-color: @state-primary-inverse-bg;
}

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

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

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

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

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

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