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

svelte-select css variables #339

Closed
qbacuber opened this issue Nov 9, 2023 · 5 comments
Closed

svelte-select css variables #339

qbacuber opened this issue Nov 9, 2023 · 5 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@qbacuber
Copy link

qbacuber commented Nov 9, 2023

Hey,
it seems to me that the css variables for svelte-select are too generically named and missing the prefix. It just so happens that border, border-radius, background I already use in my application, and these are overridden.

vanilla-jsoneditor\themes\jse-theme-default.css and vanilla-jsoneditor\themes\jse-theme-dark.css

  /* svelte-select */
  --item-is-active-bg: #3883fa;
  --border: 1px solid #d8dbdf;
  --border-radius: 3px;
  --background: #fff;
  --padding: 0 10px;
  --multi-select-padding: 0 10px;
@josdejong
Copy link
Owner

Yes it's not ideal.

We can probably wrap the variables inside say .jse-modal { ... } like suggested here rob-balfre/svelte-select#522

Help fixing this would be welcome.

@josdejong josdejong added enhancement New feature or request help wanted Extra attention is needed labels Nov 9, 2023
@SamMousa
Copy link
Contributor

Is there a reason why the variables are defined on :root at all?
I'm seeing contamination outside the component because of this.

Why not just scope the variables properly?

@josdejong
Copy link
Owner

There is no special reason for that. We should indeed scope the variables properly.

Help would be welcome.

@SamMousa
Copy link
Contributor

#340

@josdejong
Copy link
Owner

Fixed now in v0.20.0 via #344, thanks again Sam.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants