Blame view

src/styles/components/modal.less 3.63 KB
be966e9f   梁灏   add Modal component
1
2
3
4
5
6
7
8
9
10
11
  @modal-prefix-cls: ~"@{css-prefix}modal";
  @confirm-prefix-cls: ~"@{css-prefix}modal-confirm";
  
  .@{modal-prefix-cls} {
      width: auto;
      margin: 0 auto;
      position: relative;
      outline: none;
      top: 100px;
  
      &-hidden {
69576f47   梁灏   add Slider component
12
          display: none !important;
be966e9f   梁灏   add Modal component
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
      }
  
      &-wrap {
          position: fixed;
          overflow: auto;
          top: 0;
          right: 0;
          bottom: 0;
          left: 0;
          z-index: @zindex-modal;
          -webkit-overflow-scrolling: touch;
          outline: 0;
      }
  
      &-wrap * {
          box-sizing: border-box;
          -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
      }
  
      &-mask {
          .mask;
      }
  
      &-content {
          position: relative;
          background-color: #fff;
          border: 0;
          border-radius: @border-radius-base;
          background-clip: padding-box;
1c7289e9   梁灏   Modal add mask & ...
42
43
44
45
46
          box-shadow: 0 4px 12px rgba(0,0,0,.15);
  
          &-no-mask{
              pointer-events: auto;
          }
be966e9f   梁灏   add Modal component
47
48
49
50
51
52
53
      }
  
      &-header {
          .content-header;
      }
  
      &-close {
d42d4def   梁灏   Modal add fullscr...
54
          z-index: 1;
09a04302   梁灏   optimize Modal style
55
          .content-close(1px, 31px);
be966e9f   梁灏   add Modal component
56
57
58
59
60
61
62
63
64
65
      }
  
      &-body {
          padding: 16px;
          font-size: 12px;
          line-height: 1.5;
      }
  
      &-footer {
          border-top: 1px solid @border-color-split;
017ab15b   梁灏   publish 0.9.8-rc-5
66
          padding: 12px 18px 12px 18px;
be966e9f   梁灏   add Modal component
67
68
69
70
71
72
          text-align: right;
          button + button {
              margin-left: 8px;
              margin-bottom: 0;
          }
      }
d42d4def   梁灏   Modal add fullscr...
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
  
      &-fullscreen{
          width: 100% !important;
          top: 0;
          bottom: 0;
          position: absolute;
  
          @modal-header-height: 51px;
          @modal-footer-height: 61px;
  
          .@{modal-prefix-cls}-content{
              width: 100%;
              border-radius: 0;
              position: absolute;
              top: 0;
              bottom: 0;
          }
  
          .@{modal-prefix-cls}-body{
              width: 100%;
              overflow: auto;
              position: absolute;
              top: @modal-header-height;
              bottom: @modal-footer-height;
          }
          &-no-header .@{modal-prefix-cls}-body{
              top: 0;
          }
          &-no-footer .@{modal-prefix-cls}-body{
              bottom: 0;
          }
          .@{modal-prefix-cls}-footer{
              position: absolute;
              width: 100%;
              bottom: 0;
          }
      }
1c7289e9   梁灏   Modal add mask & ...
110
111
112
      &-no-mask{
          pointer-events: none;
      }
be966e9f   梁灏   add Modal component
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
  }
  
  @media (max-width: 768px) {
      .@{modal-prefix-cls} {
          width: auto !important;
          margin: 10px;
      }
      .vertical-center-modal {
          .@{modal-prefix-cls} {
              flex: 1;
          }
      }
  }
  
  .@{confirm-prefix-cls} {
66993732   梁灏   update Modal、Poptip
128
      padding: 0 4px;
be966e9f   梁灏   add Modal component
129
      &-head {
66993732   梁灏   update Modal、Poptip
130
131
  
          &-title {
be966e9f   梁灏   add Modal component
132
              display: inline-block;
66993732   梁灏   update Modal、Poptip
133
134
135
136
137
138
139
140
141
142
143
144
145
146
              font-size: @font-size-base;
              color: @title-color;
              font-weight: 700;
          }
      }
  
      &-body{
          margin-top: 6px;
          padding-left: 48px;
          padding-top: 18px;
          font-size: @font-size-small;
          color: @text-color;
          position: relative;
  
3ef24d5f   Aresn   $Modal support re...
147
148
149
150
151
          &-render{
              margin: 0;
              padding: 0;
          }
  
66993732   梁灏   update Modal、Poptip
152
153
154
155
156
          &-icon {
              font-size: 36px;
              position: absolute;
              top: 0;
              left: 0;
be966e9f   梁灏   add Modal component
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
  
              &-info {
                  color: @primary-color;
              }
              &-success {
                  color: @success-color;
              }
              &-warning {
                  color: @warning-color;
              }
              &-error {
                  color: @error-color;
              }
              &-confirm {
                  color: @warning-color;
              }
          }
be966e9f   梁灏   add Modal component
174
175
176
      }
  
      &-footer{
66993732   梁灏   update Modal、Poptip
177
          margin-top: 40px;
be966e9f   梁灏   add Modal component
178
179
180
181
182
183
184
185
          text-align: right;
  
          button + button {
              margin-left: 8px;
              margin-bottom: 0;
          }
      }
  }