siddhartharya commited on
Commit
83759f1
·
verified ·
1 Parent(s): cd70af5

Update app.css

Browse files
Files changed (1) hide show
  1. app.css +38 -175
app.css CHANGED
@@ -1,184 +1,47 @@
1
- /* Define CSS Variables for Themes */
2
- :root {
3
- --background-color: #FFFFFF;
4
- --text-color: #000000;
5
- --success-color: #4CAF50;
6
- --error-color: #D32F2F;
7
- --card-shadow: rgba(0, 0, 0, 0.2);
8
- }
9
-
10
- .dark-theme {
11
- --background-color: #121212;
12
- --text-color: #FFFFFF;
13
- --success-color: #81C784;
14
- --error-color: #E57373;
15
- --card-shadow: rgba(255, 255, 255, 0.2);
16
- }
17
 
18
- /* Apply Background and Text Colors */
19
- body {
20
- background-color: var(--background-color);
21
- color: var(--text-color);
22
- transition: background-color 0.3s, color 0.3s;
23
- }
24
-
25
- /* Card Styles */
26
  .card {
27
- box-shadow: 0 4px 8px 0 var(--card-shadow);
28
- transition: box-shadow 0.3s, background-color 0.3s;
29
- background-color: var(--background-color);
30
  padding: 10px;
31
  margin: 10px;
32
  border-radius: 5px;
33
  }
34
 
35
  .card:hover {
36
- box-shadow: 0 8px 16px 0 var(--card-shadow);
37
- }
38
-
39
- /* Toggle Switch Styles */
40
- .theme-toggle {
41
- display: flex;
42
- align-items: center;
43
- justify-content: flex-end;
44
- padding: 10px;
45
- }
46
-
47
- .switch {
48
- position: relative;
49
- display: inline-block;
50
- width: 60px;
51
- height: 34px;
52
- }
53
-
54
- .switch input {
55
- opacity: 0;
56
- width: 0;
57
- height: 0;
58
- }
59
-
60
- .slider {
61
- position: absolute;
62
- cursor: pointer;
63
- top: 0;
64
- left: 0;
65
- right: 0;
66
- bottom: 0;
67
- background-color: #ccc;
68
- transition: .4s;
69
- border-radius: 34px;
70
- }
71
-
72
- .slider:before {
73
- position: absolute;
74
- content: "";
75
- height: 26px;
76
- width: 26px;
77
- left: 4px;
78
- bottom: 4px;
79
- background-color: white;
80
- transition: .4s;
81
- border-radius: 50%;
82
- }
83
-
84
- input:checked + .slider {
85
- background-color: #2196F3;
86
- }
87
-
88
- input:checked + .slider:before {
89
- transform: translateX(26px);
90
- }
91
-
92
- /* Gradio Components Styling */
93
- .gradio-container {
94
- background-color: var(--background-color);
95
- color: var(--text-color);
96
- transition: background-color 0.3s, color 0.3s;
97
- }
98
-
99
- /* Ensure All Text Elements Use var(--text-color) */
100
- body, p, h1, h2, h3, h4, h5, h6, span, a, label, button, input, textarea, select {
101
- color: var(--text-color);
102
- transition: color 0.3s, background-color 0.3s;
103
- }
104
-
105
- /* Links Styling */
106
- a {
107
- color: var(--text-color);
108
- text-decoration: underline;
109
- }
110
-
111
- a:hover {
112
- color: var(--success-color);
113
- }
114
-
115
- /* Buttons Styling */
116
- button, .gr-button {
117
- background-color: var(--success-color);
118
- color: var(--background-color);
119
- border: none;
120
- padding: 10px 20px;
121
- text-align: center;
122
- text-decoration: none;
123
- display: inline-block;
124
- font-size: 16px;
125
- margin: 4px 2px;
126
- cursor: pointer;
127
- border-radius: 4px;
128
- transition: background-color 0.3s, color 0.3s;
129
- }
130
-
131
- button:hover, .gr-button:hover {
132
- background-color: var(--error-color);
133
- }
134
-
135
- /* Inputs and Selects Styling */
136
- input, textarea, select, .gr-textbox, .gr-dropdown, .gr-file {
137
- background-color: var(--background-color);
138
- color: var(--text-color);
139
- border: 1px solid var(--text-color);
140
- border-radius: 4px;
141
- padding: 8px;
142
- transition: background-color 0.3s, color 0.3s, border-color 0.3s;
143
- }
144
-
145
- /* Checkbox and Radio Buttons Styling */
146
- input[type="checkbox"], input[type="radio"] {
147
- accent-color: var(--success-color);
148
- }
149
-
150
- /* Gradio-specific Class Overrides */
151
- .gradio-container .gradio-block,
152
- .gradio-container .gradio-row,
153
- .gradio-container .gradio-column {
154
- background-color: var(--background-color);
155
- color: var(--text-color);
156
- }
157
-
158
- /* Ensure Gradio Tabs Respect the Theme */
159
- .gradio-container .tab-title {
160
- color: var(--text-color);
161
- }
162
-
163
- .gradio-container .tab-title.selected {
164
- border-bottom: 2px solid var(--success-color);
165
- }
166
-
167
- /* Additional Styling for HTML Components within Gradio */
168
- .gradio-container .markdown p,
169
- .gradio-container .markdown h1,
170
- .gradio-container .markdown h2,
171
- .gradio-container .markdown h3,
172
- .gradio-container .markdown h4,
173
- .gradio-container .markdown h5,
174
- .gradio-container .markdown h6 {
175
- color: var(--text-color);
176
- }
177
-
178
- .gradio-container .html-content a {
179
- color: var(--text-color);
180
- }
181
-
182
- .gradio-container .html-content a:hover {
183
- color: var(--success-color);
184
  }
 
1
+ /* app.css */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
 
3
+ /* Card Styling */
 
 
 
 
 
 
 
4
  .card {
5
+ box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2);
6
+ transition: 0.3s;
 
7
  padding: 10px;
8
  margin: 10px;
9
  border-radius: 5px;
10
  }
11
 
12
  .card:hover {
13
+ box-shadow: 0 8px 16px 0 rgba(0,0,0,0.2);
14
+ }
15
+
16
+ /* Dynamic Theme Styling */
17
+ @media (prefers-color-scheme: dark) {
18
+ body {
19
+ color: white;
20
+ background-color: #121212;
21
+ }
22
+ .card {
23
+ background-color: #1e1e1e;
24
+ }
25
+ a {
26
+ color: #bb86fc;
27
+ }
28
+ h1, h2, h3, p, strong {
29
+ color: inherit;
30
+ }
31
+ }
32
+
33
+ @media (prefers-color-scheme: light) {
34
+ body {
35
+ color: black;
36
+ background-color: white;
37
+ }
38
+ .card {
39
+ background-color: #fff;
40
+ }
41
+ a {
42
+ color: #1a0dab;
43
+ }
44
+ h1, h2, h3, p, strong {
45
+ color: inherit;
46
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
47
  }