Blame view

src/styles/components/table.less 2.26 KB
744eb0af   梁灏   update Table comp...
1
2
3
  @table-prefix-cls: ~"@{css-prefix}table";
  
  .@{table-prefix-cls} {
0d136465   梁灏   update Table
4
      width: 100%;
744eb0af   梁灏   update Table comp...
5
      max-width: 100%;
0d136465   梁灏   update Table
6
      overflow: hidden;
744eb0af   梁灏   update Table comp...
7
8
      color: @text-color;
      font-size: @font-size-small;
0d136465   梁灏   update Table
9
10
11
12
13
14
      background-color: #fff;
      border: 1px solid @border-color-base;
      border-bottom: 0;
      border-collapse: collapse;
      box-sizing: border-box;
      position: relative;
744eb0af   梁灏   update Table comp...
15
  
0d136465   梁灏   update Table
16
17
18
19
20
21
22
23
24
25
      th, td
      {
          min-width: 0;
          height: 48px;
          box-sizing: border-box;
          text-align: left;
          text-overflow: ellipsis;
          vertical-align: middle;
          position: relative;
          border-bottom: 1px solid @border-color-split;
744eb0af   梁灏   update Table comp...
26
27
      }
  
0d136465   梁灏   update Table
28
29
      th {
          height: 40px;
744eb0af   梁灏   update Table comp...
30
31
          white-space: nowrap;
          overflow: hidden;
0d136465   梁灏   update Table
32
33
34
35
36
          background-color: @table-thead-bg;
      }
      td{
          background-color: #fff;
          transition: background-color @transition-time @ease-in-out;
744eb0af   梁灏   update Table comp...
37
38
      }
  
0d136465   梁灏   update Table
39
40
      th&-column,
      td&-column
744eb0af   梁灏   update Table comp...
41
      {
0d136465   梁灏   update Table
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
          &-left{
              text-align: left;
          }
          &-center{
              text-align: center;
          }
          &-right{
              text-align: right;
          }
      }
  
      & table{
          width: 100%;
      }
      &-border{
          th,td{
              border-right: 1px solid @border-color-split;
          }
      }
      &-cell{
          padding-left: 18px;
          padding-right: 18px;
          overflow: hidden;
744eb0af   梁灏   update Table comp...
65
          text-overflow: ellipsis;
0d136465   梁灏   update Table
66
67
68
69
70
71
          white-space: normal;
          word-break: break-all;
          box-sizing: border-box;
      }
      th &-cell{
          display: inline-block;
744eb0af   梁灏   update Table comp...
72
          position: relative;
0d136465   梁灏   update Table
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
          word-wrap: normal;
          vertical-align: middle;
      }
  
      &-stripe &-body{
          tr:nth-child(2n) {
              td{
                  background-color: @table-td-stripe-bg;
              }
          }
      }
  
      tr:hover{
          td{
              background-color: @table-td-hover-bg;
          }
      }
  
      &-large {
          font-size: @font-size-base;
          th{
              height: 48px;
          }
          td{
              height: 60px;
          }
      }
  
      &-small{
          th{
              height: 32px;
          }
          td{
              height: 40px;
          }
      }
  
      &-row-highlight,
      tr&-row-highlight:hover,
      &-stripe &-body tr&-row-highlight:nth-child(2n)
      {
          td{
              background-color: @table-td-highlight-bg;
          }
744eb0af   梁灏   update Table comp...
117
118
      }
  }