Last active
May 26, 2025 13:39
-
-
Save phreakin/26dbc235461230b1a6b45718e6006019 to your computer and use it in GitHub Desktop.
CSS color theme that applies to all form elements inside .theme-dark scope
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* =================================================================== | |
Universal Dark Theme Form Stylesheet | |
- Applies to all form elements inside .theme-dark scope | |
- Modular, safe, and override-friendly | |
=================================================================== */ | |
/* Google Fonts */ | |
@import url('https://fonts.googleapis.com/css2?family=Fira+Code&display=swap'); | |
/* === Root Class for Theming Scope === */ | |
.theme-dark { | |
font-family: 'Fira Code', monospace; | |
font-size: 14px; | |
font-weight: 400; | |
line-height: 1.5; | |
background-color: #000; | |
color: #facc15; | |
} | |
/* === Inputs, Textareas, Selects === */ | |
.theme-dark input:not([type="hidden"]):not([type="file"]), | |
.theme-dark select, | |
.theme-dark textarea { | |
background-color: #000; | |
color: #facc15; | |
border: 1px solid #facc15; | |
border-radius: 6px; | |
accent-color: #facc15; | |
padding: 0.5rem; | |
transition: all 0.3s ease; | |
} | |
/* === Buttons === */ | |
.theme-dark button, | |
.theme-dark input[type="submit"], | |
.theme-dark input[type="button"] { | |
background-color: #facc15; | |
color: #000; | |
border: 1px solid #facc15; | |
padding: 0.5rem 1rem; | |
font-weight: bold; | |
cursor: pointer; | |
transition: background-color 0.3s ease, color 0.3s ease; | |
} | |
.theme-dark button:hover, | |
.theme-dark input[type="submit"]:hover, | |
.theme-dark input[type="button"]:hover { | |
background-color: #eab308; | |
} | |
/* === Disabled State === */ | |
.theme-dark input:disabled, | |
.theme-dark select:disabled, | |
.theme-dark textarea:disabled { | |
background-color: #111; | |
color: #777; | |
border-color: #333; | |
} | |
/* === Focus State === */ | |
.theme-dark input:focus, | |
.theme-dark select:focus, | |
.theme-dark textarea:focus { | |
border-color: #eab308; | |
box-shadow: 0 0 0 2px #eab30855; | |
outline: none; | |
} | |
/* === Labels, Fieldset, Legend === */ | |
.theme-dark label, | |
.theme-dark fieldset, | |
.theme-dark legend { | |
color: #facc15; | |
font-weight: bold; | |
border-color: #facc15; | |
} | |
/* === Feedback === */ | |
.theme-dark .form-text, | |
.theme-dark .invalid-feedback, | |
.theme-dark .valid-feedback { | |
font-size: 0.875rem; | |
margin-top: 0.25rem; | |
} | |
.theme-dark .invalid-feedback { | |
color: #f87171; | |
} | |
.theme-dark .valid-feedback { | |
color: #4ade80; | |
} | |
/* === File Upload Button === */ | |
.theme-dark input[type="file"]::-webkit-file-upload-button { | |
background-color: #facc15; | |
color: #000; | |
border: 1px solid #facc15; | |
cursor: pointer; | |
transition: background-color 0.3s ease; | |
} | |
.theme-dark input[type="file"]::-webkit-file-upload-button:hover { | |
background-color: #eab308; | |
} | |
/* === Range Slider === */ | |
.theme-dark input[type="range"] { | |
background-color: #000; | |
border: 1px solid #facc15; | |
accent-color: #facc15; | |
} | |
/* === Checkbox and Radio === */ | |
.theme-dark input[type="checkbox"], | |
.theme-dark input[type="radio"] { | |
accent-color: #facc15; | |
} | |
/* === Select Options === */ | |
.theme-dark option, | |
.theme-dark optgroup { | |
background-color: #000; | |
color: #facc15; | |
} | |
/* === Progress & Meter === */ | |
.theme-dark progress, | |
.theme-dark meter { | |
background-color: #000; | |
color: #facc15; | |
border: 1px solid #facc15; | |
accent-color: #facc15; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment