Skip to content
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 slider #2240

Merged
merged 2 commits into from
Jul 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/lib/holocene/input/range-input.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
id="{id}-range"
name="range"
type="range"
class="h-0 w-full cursor-pointer appearance-none rounded border-y-2 border-primary"
class="surface-information h-0 w-full cursor-pointer appearance-none rounded border-y border-primary"
bind:value
on:input={handleInput}
{min}
Expand Down Expand Up @@ -124,7 +124,7 @@
}

.numeric-input {
@apply surface-primary h-10 w-10 rounded-lg border-2 border-subtle text-center text-sm focus-within:outline-none focus-within:ring-4 focus-within:ring-primary/70;
@apply h-10 w-10 rounded-lg border-2 border-subtle bg-information text-center text-sm focus-within:outline-none focus-within:ring-4 focus-within:ring-primary/70;

appearance: textfield;
}
Expand All @@ -148,7 +148,7 @@
}

input[type='range']::-webkit-slider-thumb {
@apply h-4 w-8 appearance-none rounded-full border border-solid border-primary bg-gradient-to-br from-blue-100 to-purple-100;
@apply surface-information h-4 w-8 appearance-none rounded-full border-2 border-solid border-primary;
}

input[type='range']::-moz-range-thumb {
Expand Down
3 changes: 3 additions & 0 deletions src/lib/theme/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ const temporal = plugin(
backgroundColor: css('--color-interactive-ghost-active'),
},
},
'.surface-information': {
backgroundColor: css('--color-surface-information'),
Copy link
Contributor

@laurakwhit laurakwhit Jul 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@GraceGardner just wanted to follow-up here before I make any changes! Was there a specific reason surface-information was added here? Looks like we're just using backgroundColor and that already exists ⬇️

information: css('--color-surface-information'),

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've gone ahead and removed it here.

},
'.surface-inverse': {
backgroundColor: css('--color-surface-inverse'),
color: css('--color-text-inverse'),
Expand Down
Loading