Skip to content

Improve styling when bulma is not used (expecially for multiple selection) #119

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

Open
pstanoev opened this issue Oct 29, 2021 · 5 comments
Open
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@pstanoev
Copy link
Owner

The current CSS in the component is very minimal and doesn't look good if Bulma is not used.
Improvements to the UI (borders, colors, arrow icon) are needed.

The multiple selection component has severe visual bugs.

@pstanoev pstanoev added enhancement New feature or request help wanted Extra attention is needed labels Oct 29, 2021
@Wobbley
Copy link

Wobbley commented Dec 28, 2021

I am not quite sure how it is supposed to be styled after reading the Readme.MD

I added a className with a custom CSS style then a style in the CSS, without any luck, what am I doing wrong?

<AutoComplete className="teststyle" items="{items}" bind:selectedItem="{selectedColor}"/>

and then under style:

<style>
    .teststyle {
        background-color: red;
    }
</style>

@joetm
Copy link
Contributor

joetm commented Dec 28, 2021

Pretty impossible to apply styles to the autocomplete at the moment.
I tried every combination I could think of.
Styles in svelte, giving the component classnames, using the classes from the DOM - it just does not apply any styles.

@Wobbley
Copy link

Wobbley commented Dec 28, 2021

Pretty impossible to apply styles to the autocomplete at the moment. I tried every combination I could think of. Styles in svelte, giving the component classnames, using the classes from the DOM - it just does not apply any styles.

Good to know it's not just me, I went with https://github.com/rob-balfre/svelte-select instead. It is more complicated but at least it has some styling, even if it is cumbersome.

@joetm
Copy link
Contributor

joetm commented Dec 29, 2021

Okay, I found out how it's done. You can use global to manipulate the style of child components:

  .parent :global(.childClass) {
    color: red;
  }

@stephenswetonic
Copy link

Okay, I found out how it's done. You can use global to manipulate the style of child components:

  .parent :global(.childClass) {
    color: red;
  }

Just wondering what is the parent and child class in this case? The only way I found to apply styles is with tailwind utility classes, but it doesn't correctly position the component.

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

4 participants