Blame view

src/styles/components/split.less 3.24 KB
8979c734   zhigang.li   add split components
1
2
3
  @split-prefix-cls: ~"@{css-prefix}split";
  @box-shadow: 0 0 4px 0 rgba(28, 36, 56, 0.4);
  @trigger-bar-background: rgba(23, 35, 61, 0.25);
39fc24dc   梁灏   update Split
4
  @trigger-background: #f8f8f9;
8979c734   zhigang.li   add split components
5
6
7
8
9
10
11
  @trigger-width: 6px;
  @trigger-bar-width: 4px;
  @trigger-bar-offset: (@trigger-width - @trigger-bar-width) / 2;
  @trigger-bar-interval: 3px;
  @trigger-bar-weight: 1px;
  @trigger-bar-con-height: (@trigger-bar-weight + @trigger-bar-interval) * 8;
  
1e9bece0   梁灏   update Split
12
13
14
15
16
  .@{split-prefix-cls} {
      &-wrapper {
          position: relative;
          width: 100%;
          height: 100%;
8979c734   zhigang.li   add split components
17
      }
1e9bece0   梁灏   update Split
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
      &-pane {
          position: absolute;
          &.left-pane, &.right-pane {
              top: 0;
              bottom: 0;
          }
          &.left-pane {
              left: 0;
          }
          &.right-pane {
              right: 0;
          }
          &.top-pane, &.bottom-pane {
              left: 0;
              right: 0;
          }
          &.top-pane {
              top: 0;
          }
          &.bottom-pane {
              bottom: 0;
          }
  
          &-moving{
              -webkit-user-select: none;
              -moz-user-select: none;
              -ms-user-select: none;
              user-select: none;
          }
8979c734   zhigang.li   add split components
47
      }
1e9bece0   梁灏   update Split
48
      &-trigger {
39fc24dc   梁灏   update Split
49
          border: 1px solid @border-color-base;
1e9bece0   梁灏   update Split
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
          &-con {
              position: absolute;
              transform: translate(-50%, -50%);
              z-index: 10;
          }
          &-bar-con {
              position: absolute;
              overflow: hidden;
              &.vertical {
                  left: @trigger-bar-offset;
                  top: 50%;
                  height: @trigger-bar-con-height;
                  transform: translate(0, -50%);
              }
              &.horizontal {
                  left: 50%;
                  top: @trigger-bar-offset;
                  width: @trigger-bar-con-height;
                  transform: translate(-50%, 0);
              }
          }
          &-vertical {
              width: @trigger-width;
              height: 100%;
              background: @trigger-background;
39fc24dc   梁灏   update Split
75
76
              border-top: none;
              border-bottom: none;
1e9bece0   梁灏   update Split
77
78
79
80
81
82
83
84
85
86
87
88
89
              cursor: col-resize;
              .@{split-prefix-cls}-trigger-bar {
                  width: @trigger-bar-width;
                  height: 1px;
                  background: @trigger-bar-background;
                  float: left;
                  margin-top: @trigger-bar-interval;
              }
          }
          &-horizontal {
              height: @trigger-width;
              width: 100%;
              background: @trigger-background;
39fc24dc   梁灏   update Split
90
91
              border-left: none;
              border-right: none;
1e9bece0   梁灏   update Split
92
93
94
95
96
97
98
99
100
              cursor: row-resize;
              .@{split-prefix-cls}-trigger-bar {
                  height: @trigger-bar-width;
                  width: 1px;
                  background: @trigger-bar-background;
                  float: left;
                  margin-right: @trigger-bar-interval;
              }
          }
8979c734   zhigang.li   add split components
101
      }
1e9bece0   梁灏   update Split
102
103
104
105
106
107
      &-horizontal {
          .@{split-prefix-cls}-trigger-con {
              top: 50%;
              height: 100%;
              width: 0;
          }
8979c734   zhigang.li   add split components
108
      }
1e9bece0   梁灏   update Split
109
110
111
112
113
114
      &-vertical {
          .@{split-prefix-cls}-trigger-con {
              left: 50%;
              height: 0;
              width: 100%;
          }
8979c734   zhigang.li   add split components
115
      }
1e9bece0   梁灏   update Split
116
117
118
119
120
121
      .no-select {
          -webkit-touch-callout: none;
          -webkit-user-select: none;
          -moz-user-select: none;
          -ms-user-select: none;
          user-select: none;
8979c734   zhigang.li   add split components
122
      }
8979c734   zhigang.li   add split components
123
  }