gradio-dataframe / src /app.css
akhaliq's picture
akhaliq HF Staff
Upload src/app.css with huggingface_hub
3cced30 verified
Raw
History Blame Contribute Delete
3.37 kB
/* src/app.css */
:root {
--gr-df-table-bg-even: #ffffff;
--gr-df-table-bg-odd: #f9fafb;
--gr-df-copied-cell-color: #fef3c7;
--gr-df-table-border: #e5e7eb;
--gr-df-table-text: #111827;
--gr-df-accent: #667eea;
--gr-df-accent-soft: #eef2ff;
--gr-df-font-size: 14px;
--gr-df-font-mono: 'Fira Code', 'Monaco', 'Courier New', monospace;
--gr-df-font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
--gr-df-table-radius: 8px;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: var(--gr-df-font-sans);
font-size: var(--gr-df-font-size);
color: var(--gr-df-table-text);
line-height: 1.6;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
button {
font-family: inherit;
font-size: inherit;
cursor: pointer;
transition: all 0.2s ease;
}
button:hover {
transform: translateY(-1px);
}
button:active {
transform: translateY(0);
}
input, select, textarea {
font-family: inherit;
font-size: inherit;
}
code {
font-family: var(--gr-df-font-mono);
background: #f3f4f6;
padding: 2px 6px;
border-radius: 4px;
font-size: 0.9em;
}
.card {
background: white;
border-radius: 12px;
padding: 1.5rem;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
transition: box-shadow 0.2s ease;
}
.card:hover {
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
.btn {
background: var(--gr-df-accent);
color: white;
border: none;
padding: 0.625rem 1.25rem;
border-radius: 8px;
font-weight: 500;
display: inline-flex;
align-items: center;
gap: 0.5rem;
transition: all 0.2s ease;
}
.btn:hover {
background: #5a67d8;
box-shadow: 0 4px 6px rgba(102, 126, 234, 0.25);
}
.btn:disabled {
opacity: 0.5;
cursor: not-allowed;
}
.btn-secondary {
background: #f3f4f6;
color: #374151;
}
.btn-secondary:hover {
background: #e5e7eb;
}
.input-group {
display: flex;
flex-direction: column;
gap: 0.5rem;
margin-bottom: 1rem;
}
.input-group label {
font-weight: 500;
color: #374151;
font-size: 0.875rem;
}
.input-group input,
.input-group select {
padding: 0.5rem 0.75rem;
border: 1px solid #d1d5db;
border-radius: 6px;
background: white;
transition: border-color 0.2s ease;
}
.input-group input:focus,
.input-group select:focus {
outline: none;
border-color: var(--gr-df-accent);
box-shadow: 0 0 0 3px var(--gr-df-accent-soft);
}
.switch {
display: flex;
align-items: center;
gap: 0.75rem;
cursor: pointer;
user-select: none;
}
.switch input[type="checkbox"] {
width: 2.5rem;
height: 1.25rem;
appearance: none;
background: #d1d5db;
border-radius: 9999px;
position: relative;
cursor: pointer;
transition: background 0.2s ease;
}
.switch input[type="checkbox"]:checked {
background: var(--gr-df-accent);
}
.switch input[type="checkbox"]::after {
content: '';
position: absolute;
width: 1rem;
height: 1rem;
background: white;
border-radius: 50%;
top: 0.125rem;
left: 0.125rem;
transition: transform 0.2s ease;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
.switch input[type="checkbox"]:checked::after {
transform: translateX(1.25rem);
}
@media (prefers-reduced-motion: reduce) {
* {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
}
}