messager.less 2.8 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
  transition-property: opacity, transform!important;
C
Catouse 已提交
21 22
}

C
Catouse 已提交
23 24 25 26 27 28 29 30
.messager-icon {
  display: table-cell;
  padding: 10px 0 10px 15px;
  vertical-align: top;
  line-height: 20px;
  text-align: center;
}

C
Catouse 已提交
31
.messager-content {
32 33 34
  padding: 10px 15px;
  display: table-cell;
  vertical-align: top;
C
Catouse 已提交
35
}
C
Catouse 已提交
36

C
Catouse 已提交
37 38 39
.messager-title {
  font-weight: bold;
  font-size: @font-size-large;
C
Catouse 已提交
40 41
}

C
Catouse 已提交
42
.messager-actions {
43 44
  display: table-cell;
  vertical-align: top;
C
Catouse 已提交
45

C
Catouse 已提交
46
  > .action {
C
Catouse 已提交
47
    color: #fafafa;
C
Catouse 已提交
48
    color: rgba(255,255,255,.6);
C
Catouse 已提交
49 50 51
    background: none;
    border: none;
    text-shadow: none;
C
Catouse 已提交
52 53 54 55
    min-width: 40px;
    padding: 0 12px;
    height: 40px;
    text-align: center;
C
Catouse 已提交
56

C
Catouse 已提交
57
    &.close {
C
Catouse 已提交
58
      padding-bottom: 5px;
C
Catouse 已提交
59 60 61 62 63
      opacity: 1;
      font-size: 20px;
      font-weight: normal;
    }

C
Catouse 已提交
64
    &:hover {
C
Catouse 已提交
65
      color: #fff;
C
Catouse 已提交
66
      background: rgba(0,0,0,.1);
C
Catouse 已提交
67
    }
C
Catouse 已提交
68
  }
C
Catouse 已提交
69 70

  .action-icon + .action-text {margin-left: 8px;}
C
Catouse 已提交
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 119 120 121 122 123 124 125
.messagers-holder {
  z-index: 99999;
  position: fixed;
  padding: 10px;
  pointer-events: none;

  &.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 已提交
126 127 128 129 130 131 132 133 134 135 136 137 138 139
.messager-notification {
  border-radius: @messager-notification-radius;
  min-width: @messager-notification-min-width;
  max-width: @messager-notification-max-width;

  .messager-icon {
    vertical-align: middle;
    width: 42px;
  }
  .messager-content {
    vertical-align: middle;
  }
}

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

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

C
Catouse 已提交
148
.messager-info {
C
Catouse 已提交
149 150 151
  background-color: @state-info-inverse-bg;
}

C
Catouse 已提交
152
.messager-warning {
C
Catouse 已提交
153 154 155
  background-color: @state-warning-inverse-bg;
}

C
Catouse 已提交
156
.messager-danger {
C
Catouse 已提交
157 158 159
  background-color: @state-danger-inverse-bg;
}

C
Catouse 已提交
160
.messager-important {
C
Catouse 已提交
161 162 163
  background-color: @state-important-inverse-bg;
}

C
Catouse 已提交
164
.messager-special {
C
Catouse 已提交
165 166
  background-color: @state-special-inverse-bg;
}