ui(colors): Adds neutral color variable and updates scrollbars (#4933)

This commit is contained in:
Dan Rukas 2025-04-08 09:43:30 -04:00 committed by GitHub
parent cfa202e89a
commit 49c08298fc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 14 additions and 7 deletions

View File

@ -9,6 +9,7 @@
@layer base {
:root {
--highlight: 191 74% 63%;
--neutral: 213 22% 59%;
--background: 236 62% 5%;
--foreground: 0 0% 98%;
--card: 236 62% 5%;

View File

@ -43,6 +43,7 @@ module.exports = {
extend: {
colors: {
highlight: 'hsl(var(--highlight))',
neutral: 'hsl(var(--neutral))',
border: 'hsl(var(--border))',
input: 'hsl(var(--input))',
ring: 'hsl(var(--ring))',

View File

@ -114,7 +114,7 @@ const ScrollBar = React.forwardRef<
)}
{...props}
>
<ScrollAreaPrimitive.ScrollAreaThumb className="bg-input relative flex-1 rounded-full" />
<ScrollAreaPrimitive.ScrollAreaThumb className="bg-neutral/50 relative flex-1 rounded-full" />
</ScrollAreaPrimitive.ScrollAreaScrollbar>
));
ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;

View File

@ -32,7 +32,8 @@
/* Thumb styles for WebKit browsers - more specific selector */
input[type='range'].scrollbarInput::-webkit-slider-thumb {
-webkit-appearance: none !important;
background-color: hsl(var(--input));
background-color: hsl(var(--neutral));
opacity: 50%;
border: none;
border-radius: 57px;
cursor: -webkit-grab;
@ -44,12 +45,14 @@ input[type='range'].scrollbarInput::-webkit-slider-thumb {
input[type='range'].scrollbarInput::-webkit-slider-thumb:active,
input[type='range'].scrollbarInput::-webkit-slider-thumb:hover {
background-color: hsl(var(--primary));
opacity: 60%;
cursor: -webkit-grabbing;
}
/* Thumb styles for Firefox - more specific selector */
input[type='range'].scrollbarInput::-moz-range-thumb {
background-color: hsl(var(--input));
background-color: hsl(var(--neutral));
opacity: 50%;
border: none;
border-radius: 57px;
cursor: -moz-grab;
@ -60,6 +63,7 @@ input[type='range'].scrollbarInput::-moz-range-thumb {
input[type='range'].scrollbarInput::-moz-range-thumb:active,
input[type='range'].scrollbarInput::-moz-range-thumb:hover {
background-color: hsl(var(--primary));
opacity: 50%;
cursor: -moz-grabbing;
}

View File

@ -9,6 +9,7 @@
@layer base {
:root {
--highlight: 191 74% 63%;
--neutral: 213 22% 59%;
--background: 236 62% 5%;
--foreground: 0 0% 98%;
--card: 234 64% 10%;
@ -252,4 +253,4 @@ input[type='number']::-webkit-outer-spin-button {
input[type='number'] {
-moz-appearance: textfield; /* For Firefox */
}
}

View File

@ -44,6 +44,7 @@ module.exports = {
extend: {
colors: {
highlight: 'hsl(var(--highlight))',
neutral: 'hsl(var(--neutral))',
border: 'hsl(var(--border))',
input: 'hsl(var(--input))',
ring: 'hsl(var(--ring))',

View File

@ -11,8 +11,6 @@
}
}
/* Truncate 2 lines utility */
.truncate-2-lines {
overflow: hidden;
@ -34,6 +32,7 @@
@layer base {
:root {
--highlight: 191 74% 63%;
--neutral: 213 22% 59%;
--background: 236 62% 5%;
--foreground: 0 0% 98%;
--card: 236 62% 5%;
@ -102,4 +101,4 @@
--chart-4: 280 65% 60%;
--chart-5: 340 75% 55%;
}
}
}