collapse.less 1.5 KB
Newer Older
A
afc163 已提交
1
@collapse-prefix-cls: ant-collapse;
翰文 已提交
2 3

#arrow {
A
afc163 已提交
4 5
  .close() {
    .iconfont-size-under-12px(7px, 270deg);
翰文 已提交
6
  }
A
afc163 已提交
7 8
  .open() {
    .iconfont-size-under-12px(7px, 360deg);
翰文 已提交
9 10 11
  }
}

A
afc163 已提交
12
.@{collapse-prefix-cls} {
翰文 已提交
13
  background-color: #f4f4f4;
翰文 已提交
14
  border-radius: 3px;
A
afc163 已提交
15
  border: 1px solid #d9d9d9;
翰文 已提交
16

17
  & > &-item {
A
afc163 已提交
18
    border-top: 1px solid #d9d9d9;
翰文 已提交
19 20 21 22
    &:first-child {
      border-top: none;
    }

A
afc163 已提交
23
    > .@{collapse-prefix-cls}-header {
24 25
      height: 38px;
      line-height: 38px;
A
afc163 已提交
26
      padding-left: 16px;
A
afc163 已提交
27
      color: #666;
28
      cursor: pointer;
29
      &:before {
A
afc163 已提交
30 31
        font-family: "anticon" !important;
        color: #666;
32 33
        display: inline-block;
        margin-right: 8px;
Z
zhujun24 已提交
34
        content: "\e60f";
A
afc163 已提交
35 36 37 38 39
        #arrow > .close();
        vertical-align: middle;
        transition: transform 0.24s ease;
        position: relative;
        top: -1px;
40 41 42 43
      }
    }
  }

翰文 已提交
44 45 46
  &-content {
    height: 0;
    overflow: hidden;
A
afc163 已提交
47
    color: @text-color;
翰文 已提交
48
    padding: 0 16px;
翰文 已提交
49
    background-color: #fff;
50 51

    & > &-box {
Z
zhujun24 已提交
52 53
      padding-top: 16px;
      padding-bottom: 16px;
翰文 已提交
54 55 56
    }
  }

Z
zhujun24 已提交
57 58 59 60 61 62
  &-collapsing {
    transition-duration: .3s;
    transition-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
    transition-property: height;
  }

63
  &-item:last-child {
A
afc163 已提交
64
    > .@{collapse-prefix-cls}-content {
65 66
      border-radius: 0 0 3px 3px;
    }
翰文 已提交
67 68
  }

69
  &-content-active {
Z
zhujun24 已提交
70
    height: auto;
翰文 已提交
71 72
  }

73
  & > &-item-active {
A
afc163 已提交
74
    > .@{collapse-prefix-cls}-header {
75 76

      &:before {
A
afc163 已提交
77
        #arrow > .open();
78
      }
翰文 已提交
79 80 81
    }
  }
}