|
55 | 55 | } |
56 | 56 |
|
57 | 57 | // ================== Cell ================== |
58 | | - &-fixed-column-gapped { |
59 | | - .@{tablePrefixCls}-cell-fix-left-last::after, |
60 | | - .@{tablePrefixCls}-cell-fix-right-first::after { |
61 | | - display: none !important; |
62 | | - } |
63 | | - } |
64 | | - |
65 | 58 | &-cell { |
66 | 59 | background: #f4f4f4; |
67 | 60 |
|
68 | | - &-fix-left, |
69 | | - &-fix-right { |
70 | | - z-index: 2; |
| 61 | + &-fix { |
| 62 | + position: sticky !important; |
| 63 | + z-index: calc(2 + var(--z-offset)); |
71 | 64 | } |
72 | 65 |
|
73 | | - &-fix-right:last-child:not(&-fix-sticky) { |
74 | | - border-right-color: transparent; |
75 | | - } |
76 | | - |
77 | | - .@{tablePrefixCls}-rtl & { |
78 | | - &-fix-right:last-child { |
79 | | - border-right-color: @border-color; |
80 | | - } |
81 | | - &-fix-left:last-child { |
82 | | - border-left-color: transparent; |
| 66 | + &-fix-start-shadow, |
| 67 | + &-fix-end-shadow { |
| 68 | + &::after { |
| 69 | + position: absolute; |
| 70 | + top: 0; |
| 71 | + bottom: 0; |
| 72 | + width: 5px; |
| 73 | + background: rgba(0, 0, 0, 0.5); |
| 74 | + opacity: 0; |
| 75 | + content: ''; |
| 76 | + transition: opacity 0.3s; |
83 | 77 | } |
84 | | - } |
85 | 78 |
|
86 | | - &-fix-left-first { |
87 | | - .@{tablePrefixCls}-rtl & { |
88 | | - box-shadow: 1px 0 0 @border-color; |
| 79 | + &-show::after { |
| 80 | + opacity: 1; |
89 | 81 | } |
90 | 82 | } |
91 | 83 |
|
92 | | - &-fix-left-first::after, |
93 | | - &-fix-left-last::after { |
94 | | - position: absolute; |
95 | | - top: 0; |
96 | | - right: -1px; |
97 | | - bottom: -1px; |
98 | | - width: 20px; |
99 | | - transform: translateX(100%); |
100 | | - transition: box-shadow 0.3s; |
101 | | - content: ''; |
102 | | - pointer-events: none; |
103 | | - } |
104 | | - |
105 | | - &-fix-left-all::after { |
106 | | - display: none; |
| 84 | + &-fix-start-shadow::after { |
| 85 | + inset-inline-start: 100%; |
107 | 86 | } |
108 | | - |
109 | | - &-fix-right-first, |
110 | | - &-fix-right-last { |
111 | | - box-shadow: -1px 0 0 @border-color; |
112 | | - |
113 | | - .@{tablePrefixCls}-rtl & { |
114 | | - box-shadow: none; |
115 | | - } |
116 | | - |
117 | | - &::after { |
118 | | - position: absolute; |
119 | | - top: 0; |
120 | | - bottom: -1px; |
121 | | - left: -1px; |
122 | | - width: 20px; |
123 | | - transform: translateX(-100%); |
124 | | - transition: box-shadow 0.3s; |
125 | | - content: ''; |
126 | | - pointer-events: none; |
127 | | - } |
| 87 | + &-fix-end-shadow::after { |
| 88 | + inset-inline-end: 100%; |
128 | 89 | } |
129 | 90 |
|
130 | 91 | &&-ellipsis { |
|
133 | 94 | text-overflow: ellipsis; |
134 | 95 |
|
135 | 96 | // Fixed first or last should special process |
136 | | - &.@{tablePrefixCls}-cell-fix-left-first, |
137 | | - &.@{tablePrefixCls}-cell-fix-left-last, |
138 | | - &.@{tablePrefixCls}-cell-fix-right-first &.@{tablePrefixCls}-cell-fix-right-last { |
| 97 | + &.@{tablePrefixCls}-cell-fix-start-shadow, |
| 98 | + &.@{tablePrefixCls}-cell-fix-end-shadow { |
139 | 99 | overflow: visible; |
140 | 100 |
|
141 | 101 | .@{tablePrefixCls}-cell-content { |
|
151 | 111 | } |
152 | 112 | } |
153 | 113 |
|
154 | | - &-ping-left { |
155 | | - .@{tablePrefixCls}-cell-fix-left-first::after, |
156 | | - .@{tablePrefixCls}-cell-fix-left-last::after { |
157 | | - box-shadow: inset 10px 0 8px -8px green; |
158 | | - } |
| 114 | + &-fix-start-shadow::before, |
| 115 | + &-fix-end-shadow::after { |
| 116 | + content: ''; |
| 117 | + position: absolute; |
| 118 | + z-index: 1; |
| 119 | + top: 0; |
| 120 | + bottom: 0; |
| 121 | + width: 5px; |
159 | 122 | } |
160 | 123 |
|
161 | | - &-ping-right { |
162 | | - .@{tablePrefixCls}-cell-fix-right-first::after, |
163 | | - .@{tablePrefixCls}-cell-fix-right-last::after { |
164 | | - box-shadow: inset -10px 0 8px -8px green; |
165 | | - } |
| 124 | + &-fix-start-shadow-show::before { |
| 125 | + inset-inline-start: 0; |
| 126 | + background: rgba(0, 0, 0, 0.5); |
| 127 | + } |
| 128 | + |
| 129 | + &-fix-end-shadow-show::after { |
| 130 | + inset-inline-end: 0; |
| 131 | + background: rgba(0, 0, 0, 0.5); |
166 | 132 | } |
167 | 133 |
|
168 | 134 | // ================= Expand ================= |
|
0 commit comments