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

Is there a way to avoid to use !important CSS mode? #38

Closed
frederikhors opened this issue Feb 19, 2022 · 12 comments
Closed

Is there a way to avoid to use !important CSS mode? #38

frederikhors opened this issue Feb 19, 2022 · 12 comments
Labels
bug Something isn't working dx Developer experience

Comments

@frederikhors
Copy link
Contributor

Is there a way to avoid to use !important CSS mode?

Can we move outerDivClass to the end?

I need my css classes to override yours.

Am I wrong?

image

@janosh
Copy link
Owner

janosh commented Feb 19, 2022

Could you clarify? outerDivClass already comes after class multiselect. Or do you mean after all other classes?

<div
- class="multiselect {outerDivClass}"
  class:readonly
  class:single={maxSelect == 1}
  class:open={showOptions}
+ class="multiselect {outerDivClass}"
  on:mouseup|stopPropagation={() => setOptionsVisible(true)}
  use:onClickOutside={() => setOptionsVisible(false)}
  use:onClickOutside={() => dispatch(`blur`)}
>

@janosh janosh added the awaiting user Needs more information from OP. label Feb 19, 2022
@frederikhors
Copy link
Contributor Author

I mean after all others.

@janosh janosh closed this as completed in 7c43987 Feb 19, 2022
@janosh janosh added bug Something isn't working dx Developer experience and removed awaiting user Needs more information from OP. labels Feb 19, 2022
@janosh
Copy link
Owner

janosh commented Feb 19, 2022

I just noticed that Svelte always applies the conditional classes last, no matter in what order I specify them. So now I'm not sure if this issue is actually solved and if not, how it can be solved.

  <MultiSelect
    id="fav-web-tool"
    options={webFrameworks}
    bind:selectedLabels={selectedWeb}
    bind:activeOption={activeWeb}
    maxSelect={6}
    {placeholder}
    {filterFunc}
    liActiveOptionClass="foobar"
  />

Screen Shot 2022-02-19 at 21 34 41

@frederikhors Will release a new version tomorrow. Perhaps you can let me know if this problem persists.

@frederikhors
Copy link
Contributor Author

Ok. I'll try ASAP.

@frederikhors
Copy link
Contributor Author

Pleas re-open it.

@janosh janosh reopened this Feb 19, 2022
@janosh
Copy link
Owner

janosh commented Feb 20, 2022

I just released v3.3.0 with all the changes we discussed. Let me know how it works for you.

@frederikhors
Copy link
Contributor Author

I will try in a few hours.

@frederikhors
Copy link
Contributor Author

I tried with the 4.0.0. This is still an issue.

@egdegauperaa
Copy link

@frederikhors doesn't it work to be more specific in the css, for instance adding a class in your statements that is outside the svelte component?

@frederikhors
Copy link
Contributor Author

Yep maybe. But I need to try, and I cannot right now.

@janosh
Copy link
Owner

janosh commented Mar 9, 2022

@frederikhors Have you had a chance to try @egdegauperaa's suggestion? If so does it help?

@frederikhors
Copy link
Contributor Author

We can close. I don't have time right now. I'll re-open if this is still an issue. Thanks both.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working dx Developer experience
Projects
None yet
Development

No branches or pull requests

3 participants