collapse.less 1.3 KB
Newer Older
翰文 已提交
1
@prefixCls: ant-collapse;
翰文 已提交
2
@borderStyle: 1px solid #d9d9d9;
翰文 已提交
3 4

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

.@{prefixCls} {
翰文 已提交
14
  background-color: #f4f4f4;
翰文 已提交
15
  border-radius: 3px;
翰文 已提交
16
  border: @borderStyle;
翰文 已提交
17

18
  & > &-item {
翰文 已提交
19 20 21 22 23
    border-top: @borderStyle;
    &:first-child {
      border-top: none;
    }

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

翰文 已提交
45 46
  &-content {
    height: 0;
A
afc163 已提交
47 48
    transition-duration: .24s;
    transition-timing-function: @ease-out-circ;
翰文 已提交
49
    overflow: hidden;
A
afc163 已提交
50
    color: @text-color;
翰文 已提交
51
    padding: 0 16px;
翰文 已提交
52
    background-color: #fff;
53 54 55 56

    & > &-box {
      margin-top: 16px;
      margin-bottom: 16px;
翰文 已提交
57 58 59
    }
  }

60 61 62 63
  &-item:last-child {
    > .@{prefixCls}-content {
      border-radius: 0 0 3px 3px;
    }
翰文 已提交
64 65
  }

66
  &-content-active {
翰文 已提交
67 68
  }

69 70 71 72
  & > &-item-active {
    > .@{prefixCls}-header {

      &:before {
A
afc163 已提交
73
        #arrow > .open();
74
      }
翰文 已提交
75 76 77
    }
  }
}