-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dark mode select combobox menu checkbox #1878
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
slate: { | ||
50: '#F5F7F9', | ||
100: '#E7EDF2', | ||
200: '#D5DEE8', | ||
300: '#B9C9D7', | ||
400: '#97AEC3', | ||
500: '#7E95B3', | ||
600: '#667CA1', | ||
700: '#607195', | ||
800: '#525D7B', | ||
900: '#444F64', | ||
950: '#2D323E', | ||
DEFAULT: '#7E95B3', | ||
50: '#E8EFFF', | ||
100: '#C9D9F0', | ||
200: '#AEBED9', | ||
300: '#92A4C3', | ||
400: '#7C8FB1', | ||
500: '#667CA1', | ||
600: '#576E8F', | ||
700: '#465A78', | ||
800: '#273860', | ||
900: '#1E293B', | ||
950: '#0F172A', | ||
DEFAULT: '#667CA1', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
export const getColor = ( | ||
color: keyof Palette, | ||
shade: Shade = 'DEFAULT', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -9,4 +11,5 @@ export const rgb = (hexColor: `#${string}`): RGB => { | |||
return `${r} ${g} ${b}`; | |||
}; | |||
|
|||
export const css = (variable: CSSVariable) => `rgb(var(${variable}))`; | |||
export const css = (variable: keyof typeof variables, opacity?: Opacity) => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks way better, everything is really nice and clean. Something to strive for in my PR's. Any chance you can explain to me why we should get rid of the primary, secondary, danger and success colors? Will we just not be using them, or is it bad naming convention?
Yes the reason has to do with just having consistent naming conventions. That big color object ends up being included in our tailwind theme, so that when we do const colors = {
indigo: {
// ...
600: '#444CE7',
// ...
}
} const variables = {
'--color-primary': rgb(getColor('indigo', 600)),
} |
* first pass at new dark mode for... input, menu, select, and combobox * clean up some styles * fix checkbox * fix snaps, remove commented out style * fix some button stuff I broke * fix checkbox * clean up hover borders on menu button * fix tests/types * return empty string label if no selected option and no placeholder
* Upgrade to Svelte4 * migration to SvelteKit 2 * Update @types/node and caniuse-lite * update sveltekit and vite to fix vulnerabilities * Expose slot bindings to named slots * Update snaps and tests * Fix type imports * Fix outside-click * fix some type stuff * Bump types/node for sec vul * Update snaps and tests * Fix snaps? * Update snaps * Dark mode select combobox menu checkbox (#1878) * first pass at new dark mode for... input, menu, select, and combobox * clean up some styles * fix checkbox * fix snaps, remove commented out style * fix some button stuff I broke * fix checkbox * clean up hover borders on menu button * fix tests/types * return empty string label if no selected option and no placeholder * 2.23.6 (#1882) Co-authored-by: Temporal Data (cicd) <commander-data@temporal.io> * Fix snaps * Actually factually for suresies 100% I know it has to be true and this is the final time and I won't make this mistake again after merging fixed the snaps --------- Co-authored-by: Alex Tideman <alex.tideman@gmail.com> Co-authored-by: Ross Edfort <rossedfort@gmail.com> Co-authored-by: Temporal Data (cicd) <commander-data@temporal.io>
Description & motivation 💭
Screenshots (if applicable) 📸
checkbox
menu
combobox
select
Note minor checkbox change in table header
Design Considerations 🎨
Testing 🧪
How was this tested 👻
Steps for others to test: 🚶🏽♂️🚶🏽♀️
Checklists
Draft Checklist
Merge Checklist
Issue(s) closed
Docs
Any docs updates needed?