UltraRonin commited on
Commit
634c9ed
·
1 Parent(s): 84b375a
Files changed (1) hide show
  1. src/display/css_html_js.py +17 -17
src/display/css_html_js.py CHANGED
@@ -1,21 +1,21 @@
1
  custom_css = """
2
- .dataframe th {
3
- position: relative;
4
- }
5
- .dataframe th::after {
6
- content: "\\f0dc"; /* Font Awesome sort icon */
7
- font-family: "Font Awesome 5 Free";
8
- font-weight: 900;
9
- position: absolute;
10
- right: 10px;
11
- top: 50%;
12
- transform: translateY(-50%);
13
- }
14
- .dataframe th.sorted-asc::after {
15
- content: "\\f0de"; /* Font Awesome sort-up icon */
16
- }
17
- .dataframe th.sorted-desc::after {
18
- content: "\\f0dd"; /* Font Awesome sort-down icon */
19
  }
20
 
21
  .markdown-text {
 
1
  custom_css = """
2
+ /* 修改排序按钮颜色、大小等 */
3
+ .gr-datatable .sorting:before,
4
+ .gr-datatable .sorting:after {
5
+ color: #007bff !important; /* 修改排序图标颜色 */
6
+ font-size: 16px !important; /* 调整大小 */
7
+ }
8
+
9
+ /* 鼠标悬停时改变颜色 */
10
+ .gr-datatable .sorting:hover:before,
11
+ .gr-datatable .sorting:hover:after {
12
+ color: #ff4500 !important; /* 悬停时变色 */
13
+ }
14
+
15
+ /* 激活的排序图标 */
16
+ .gr-datatable .sorting_asc:before,
17
+ .gr-datatable .sorting_desc:before {
18
+ color: #28a745 !important; /* 绿色代表当前排序状态 */
19
  }
20
 
21
  .markdown-text {