Blame view

src/styles/components/poptip.less 3.64 KB
9699c270   梁灏   add Poptip component
1
2
3
  @poptip-prefix-cls: ~"@{css-prefix}poptip";
  @poptip-arrow: ~"@{poptip-prefix-cls}-arrow";
  @poptip-max-width: 250px;
46c07066   梁灏   update Poptip style
4
  @poptip-arrow-width: 7px;
9699c270   梁灏   add Poptip component
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
  @poptip-arrow-outer-width: (@poptip-arrow-width + 1);
  @poptip-distance: @poptip-arrow-width - 1 + 4;
  //@poptip-arrow-color: fadein(@border-color-base, 5%);
  @poptip-arrow-color: hsla(0,0%,85%,.5);
  
  .@{poptip-prefix-cls} {
      display: inline-block;
  
      &-rel{
          display: inline-block;
          position: relative;
      }
  
      &-title {
          margin: 0;
3fa1c31e   梁灏   optimize Poptip s...
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
          padding: 8px 16px;
          position: relative;
  
          &:after{
              content: '';
              display: block;
              height: 1px;
              position: absolute;
              left: 8px;
              right: 8px;
              bottom: 0;
              background-color: @border-color-split;
          }
  
          &-inner{
              color: @title-color;
              font-size: @font-size-base;
          }
9699c270   梁灏   add Poptip component
38
39
40
      }
  
      &-body{
613f5243   梁灏   update Poptip
41
42
43
44
          padding: 8px 16px;
  
          &-content{
              overflow: auto;
3fa1c31e   梁灏   optimize Poptip s...
45
  
130ed889   梁灏   Poptip add prop w...
46
47
48
49
50
              &-word-wrap{
                  white-space: pre-wrap;
                  text-align: justify;
              }
  
3fa1c31e   梁灏   optimize Poptip s...
51
52
53
              &-inner{
                  color: @text-color;
              }
613f5243   梁灏   update Poptip
54
55
56
57
58
59
60
          }
      }
  
      &-inner{
          width: 100%;
          background-color: #fff;
          background-clip: padding-box;
3fa1c31e   梁灏   optimize Poptip s...
61
          //border: 1px solid @border-color-split;
613f5243   梁灏   update Poptip
62
63
64
          border-radius: @border-radius-small;
          box-shadow: @shadow-base;
          white-space: nowrap;
9699c270   梁灏   add Poptip component
65
66
67
68
69
70
71
72
73
74
75
76
      }
  
      &-popper{
          min-width: 150px;
          font-size: @font-size-small;
          .popper(@poptip-arrow, @poptip-arrow-width, @poptip-distance, @poptip-arrow-color);
  
          &[x-placement^="top"] .@{poptip-arrow}:after {
              content: " ";
              bottom: 1px;
              margin-left: -@poptip-arrow-width;
              border-bottom-width: 0;
06ff901f   Chuanfeng   修复 Poptip 嵌套使用时子组...
77
              border-top-width: @poptip-arrow-width;
9699c270   梁灏   add Poptip component
78
79
80
81
82
83
84
85
              border-top-color: #fff;
          }
  
          &[x-placement^="right"] .@{poptip-arrow}:after {
              content: " ";
              left: 1px;
              bottom: -@poptip-arrow-width;
              border-left-width: 0;
06ff901f   Chuanfeng   修复 Poptip 嵌套使用时子组...
86
              border-right-width: @poptip-arrow-width;
9699c270   梁灏   add Poptip component
87
88
89
90
91
92
93
94
              border-right-color: #fff;
          }
  
          &[x-placement^="bottom"] .@{poptip-arrow}:after {
              content: " ";
              top: 1px;
              margin-left: -@poptip-arrow-width;
              border-top-width: 0;
06ff901f   Chuanfeng   修复 Poptip 嵌套使用时子组...
95
              border-bottom-width: @poptip-arrow-width;
9699c270   梁灏   add Poptip component
96
97
98
99
100
101
102
              border-bottom-color: #fff;
          }
  
          &[x-placement^="left"] .@{poptip-arrow}:after {
              content: " ";
              right: 1px;
              border-right-width: 0;
06ff901f   Chuanfeng   修复 Poptip 嵌套使用时子组...
103
              border-left-width: @poptip-arrow-width;
9699c270   梁灏   add Poptip component
104
105
106
107
108
              border-left-color: #fff;
              bottom: -@poptip-arrow-width;
          }
      }
  
9699c270   梁灏   add Poptip component
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
      &-arrow{
          &, &:after{
              display: block;
              width: 0;
              height: 0;
              position: absolute;
              border-color: transparent;
              border-style: solid;
          }
      }
      &-arrow {
          border-width: @poptip-arrow-outer-width;
      }
      &-arrow:after{
          content: "";
          border-width: @poptip-arrow-width;
      }
  
      &-confirm &-popper{
          max-width: 300px;
      }
      &-confirm &-inner{
          white-space: normal;
9699c270   梁灏   add Poptip component
132
133
134
      }
  
      &-confirm &-body{
613f5243   梁灏   update Poptip
135
          padding: 16px 16px 8px;
9699c270   梁灏   add Poptip component
136
          .ivu-icon{
3fa1c31e   梁灏   optimize Poptip s...
137
              font-size: 16px;
9699c270   梁灏   add Poptip component
138
              color: @warning-color;
3fa1c31e   梁灏   optimize Poptip s...
139
              line-height: 18px;
9699c270   梁灏   add Poptip component
140
141
142
143
144
145
146
147
148
149
              position: absolute;
          }
  
          &-message{
              padding-left: 20px;
          }
      }
  
      &-confirm &-footer{
          text-align: right;
613f5243   梁灏   update Poptip
150
          padding: 8px 16px 16px;
9699c270   梁灏   add Poptip component
151
152
153
154
155
          button {
              margin-left: 4px;
          }
      }
  }