messager.less 2.9 KB
Newer Older
C
Catouse 已提交
1 2
/// ========================================================================
/// ZUI: messager.less
C
Catouse 已提交
3
/// http://openzui.com
C
Catouse 已提交
4 5 6 7 8 9 10
/// ========================================================================
/// 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 36 37
  a {
    color: inherit; font-weight: bold;
  }
C
Catouse 已提交
38
}
C
Catouse 已提交
39

C
Catouse 已提交
40 41 42
.messager-title {
  font-weight: bold;
  font-size: @font-size-large;
C
Catouse 已提交
43 44

  + .messager-text {
C
Catouse 已提交
45
    margin-top: 10px;
C
Catouse 已提交
46
  }
C
Catouse 已提交
47 48
}

C
Catouse 已提交
49
.messager-actions {
50 51
  display: table-cell;
  vertical-align: top;
C
Catouse 已提交
52

C
Catouse 已提交
53
  > .action {
C
Catouse 已提交
54
    color: #fafafa;
C
Catouse 已提交
55
    color: rgba(255,255,255,.6);
C
Catouse 已提交
56 57 58
    background: none;
    border: none;
    text-shadow: none;
C
Catouse 已提交
59 60 61 62
    min-width: 40px;
    padding: 0 12px;
    height: 40px;
    text-align: center;
C
Catouse 已提交
63

C
Catouse 已提交
64
    &.close {
C
Catouse 已提交
65
      padding-bottom: 5px;
C
Catouse 已提交
66 67 68 69 70
      opacity: 1;
      font-size: 20px;
      font-weight: normal;
    }

C
Catouse 已提交
71
    &:hover {
C
Catouse 已提交
72
      color: #fff;
C
Catouse 已提交
73
      background: rgba(0,0,0,.1);
C
Catouse 已提交
74
    }
C
Catouse 已提交
75
  }
C
Catouse 已提交
76 77

  .action-icon + .action-text {margin-left: 8px;}
C
Catouse 已提交
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 126 127 128 129 130 131 132
.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 已提交
133 134 135 136 137 138 139 140 141 142 143 144 145 146
.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 已提交
147 148 149 150
.messager-text {
  > p:last-child {margin: 0;}
}

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

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

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

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

C
Catouse 已提交
167
.messager-danger {
C
Catouse 已提交
168 169 170
  background-color: @state-danger-inverse-bg;
}

C
Catouse 已提交
171
.messager-important {
C
Catouse 已提交
172 173 174
  background-color: @state-important-inverse-bg;
}

C
Catouse 已提交
175
.messager-special {
C
Catouse 已提交
176 177
  background-color: @state-special-inverse-bg;
}