Blame view

src/styles/mixins/tooltip.less 2.2 KB
9699c270   梁灏   add Poptip component
1
2
3
4
5
6
7
8
9
10
11
12
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
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
  .popper(@arrow, @arrow-width, @arrow-distance, @bg){
      display: block;
      visibility: visible;
      font-size: @font-size-small;
      line-height: @line-height-base;
      position: absolute;
      z-index: @zindex-tooltip;
  
      &[x-placement^="top"] {
          padding: @arrow-width 0 @arrow-distance 0;
      }
      &[x-placement^="right"] {
          padding: 0 @arrow-width 0 @arrow-distance;
      }
      &[x-placement^="bottom"] {
          padding: @arrow-distance 0 @arrow-width 0;
      }
      &[x-placement^="left"] {
          padding: 0 @arrow-distance 0 @arrow-width;
      }
  
      &[x-placement^="top"] .@{arrow} {
          bottom: @arrow-distance - @arrow-width;
          border-width: @arrow-width @arrow-width 0;
          border-top-color: @bg;
      }
      &[x-placement="top"] .@{arrow} {
          left: 50%;
          margin-left: -@arrow-width;
      }
      &[x-placement="top-start"] .@{arrow} {
          left: 16px;
      }
      &[x-placement="top-end"] .@{arrow} {
          right: 16px;
      }
  
      &[x-placement^="right"] .@{arrow} {
          left: @arrow-distance - @arrow-width;
          border-width: @arrow-width @arrow-width @arrow-width 0;
          border-right-color: @bg;
      }
      &[x-placement="right"] .@{arrow} {
          top: 50%;
          margin-top: -@arrow-width;
      }
      &[x-placement="right-start"] .@{arrow} {
          top: 8px;
      }
      &[x-placement="right-end"] .@{arrow} {
          bottom: 8px;
      }
  
      &[x-placement^="left"] .@{arrow} {
          right: @arrow-distance - @arrow-width;
          border-width: @arrow-width 0 @arrow-width @arrow-width;
          border-left-color: @bg;
      }
      &[x-placement="left"] .@{arrow} {
          top: 50%;
          margin-top: -@arrow-width;
      }
      &[x-placement="left-start"] .@{arrow} {
          top: 8px;
      }
      &[x-placement="left-end"] .@{arrow} {
          bottom: 8px;
      }
  
      &[x-placement^="bottom"] .@{arrow} {
          top: @arrow-distance - @arrow-width;
          border-width: 0 @arrow-width @arrow-width;
          border-bottom-color: @bg;
      }
      &[x-placement="bottom"] .@{arrow} {
          left: 50%;
          margin-left: -@arrow-width;
      }
      &[x-placement="bottom-start"] .@{arrow} {
          left: 16px;
      }
      &[x-placement="bottom-end"] .@{arrow} {
          right: 16px;
      }
  }