File size: 4,224 Bytes
1ea2ba0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
.gradio-container {
    max-width: unset !important;
    padding: 0 !important;
}

/* 解决container=False时的错误填充 */
div.form {
    background: none !important;
}
div.no-container {
    padding: 16px 0 0 0 !important;
    background: none !important;
}

/* gradio的页脚信息 */
footer {
    display: none !important;
    margin-top: .2em !important;
    font-size: 85%;
}

.api-docs-wrap {
    margin-top: 64px;
}


/* 把radio做成列表 */
fieldset#history-select-dropdown .wrap {
    gap: 0;
}
fieldset#history-select-dropdown .wrap label {
    width: 100%;
    background: none;
    padding: 10px 16px 10px;
    box-shadow: none;
    justify-content: space-between;
}
fieldset#history-select-dropdown .wrap label:hover {
    background: var(--message-list-background-hover);
}
fieldset#history-select-dropdown .wrap label:active {
    background: var(--message-list-background-selected);
}
fieldset#history-select-dropdown .wrap label.selected {
    color: var(--checkbox-label-text-color);
    background: var(--message-list-background-selected);
    padding: 10px 64px 10px 16px;
}
fieldset#history-select-dropdown .wrap label:not(.selected) .chat-selected-btns{
    display: none;
}
fieldset#history-select-dropdown .wrap label > span {
    /* font-size: small; */
    margin-left: 0;
    /* text-overflow: ellipsis; */
    white-space: nowrap;
    word-break: break-all;
    overflow: hidden;
}
fieldset#history-select-dropdown .wrap label > span::before {
    content: url("data:image/svg+xml,%3Csvg stroke='%23000000' fill='none' stroke-opacity='0.85' stroke-width='2' viewBox='0 0 24 24' stroke-linecap='round' stroke-linejoin='round' height='1em' width='1em' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z'%3E%3C/path%3E%3C/svg%3E");
    padding-right: .8em;
    position: relative;
    top: 4px;
}
.dark fieldset#history-select-dropdown .wrap label > span::before {
    content: url("data:image/svg+xml,%3Csvg stroke='%23FFFFFF' fill='none' stroke-opacity='0.85' stroke-width='2' viewBox='0 0 24 24' stroke-linecap='round' stroke-linejoin='round' height='1em' width='1em' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z'%3E%3C/path%3E%3C/svg%3E");
}
fieldset#history-select-dropdown .wrap label > input {
    display: none;
}


/* 覆盖 gradio 丑陋的复制按钮样式 */
.message .code_wrap button[title="copy"] {
    border-radius: 5px !important;
    transition: background-color .2s ease;
    color: white;
}
.message .code_wrap button[title="copy"]:hover {
    background-color: #333232;
}
.message .code_wrap button .copy-text,
.message .code_wrap button .check {
    color: white !important;
    background: var(--neutral-950) !important;
}

.message .prose * {
	color: inherit;
}


/* Override Slider Styles (for webkit browsers like Safari and Chrome)
 * 该功能被做到gradio的官方版本中了
 * https://github.com/gradio-app/gradio/pull/5535
 * https://github.com/gradio-app/gradio/issues/4255
**/

input[type="range"][class^="svelte-"] {
    background: var(--input-background-fill);
    border-radius: 5px;
    background-image: linear-gradient(var(--slider-color), var(--slider-color));
    background-repeat: no-repeat;
}

/* Scrollbar override */
#chuanhu-chatbot > .wrapper > .bubble-wrap::-webkit-scrollbar {
    height: 1rem;
    width: 4px;
}

#chuanhu-chatbot > .wrapper > .bubble-wrap::-webkit-scrollbar-track {
    background-color: transparent;
    border-radius:9999px
}

#chuanhu-chatbot > .wrapper > .bubble-wrap::-webkit-scrollbar-thumb {
    background-color: rgba(231, 231, 231, 0.8);
    /* border-color: rgba(255, 255, 255, var(--tw-border-opacity)); */
    border: none;
    border-radius: 9999px;
    /* border-width:1px */
}

#chuanhu-chatbot > .wrapper > .bubble-wrap::-webkit-scrollbar-thumb:hover {
    --tw-bg-opacity: 1;
    background-color:rgb(195, 195, 195);
}

.dark #chuanhu-chatbot > .wrapper > .bubble-wrap::-webkit-scrollbar-thumb {
    background-color: rgba(56, 56, 56, 0.5);
}

.dark #chuanhu-chatbot > .wrapper > .bubble-wrap::-webkit-scrollbar-thumb:hover {
    background-color: rgba(56, 56, 56, 0.8);
}