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

Setting CSS #226

Open
macsupport opened this issue Apr 30, 2024 · 3 comments
Open

Setting CSS #226

macsupport opened this issue Apr 30, 2024 · 3 comments
Labels
question Further information is requested

Comments

@macsupport
Copy link

I really like your project and it works well in my App, but I am having an extremely difficult time with the CSS. It seems impossible to set css to fit in with my UI layout. I understand it is set in Svelecte.svelte but changing it to fit in with my App CSS UI (tailwind.css) has been very frustrating. No matter how I try to alter the Select CSS, it has no effect. (Using global: )
Text is too small and is truncated, the text input width is about 1em, etc. Some help in this area would be greatly appreciated. or an example of how one can reasonably alter the CSS.
This is how it looks currently

Screenshot 2024-04-29 at 9 24 17 PM

@mskocik
Copy link
Owner

mskocik commented Apr 30, 2024

Not sure what your styles look like, but try this example of custom svelecte styling in tailwind. Check the app.css file from line 57, where I added "default" properties for svelecte. You could also redefine style for inner css classes which svelecte uses.

But in general I would say, default 'layout' css should be good for every or at least almost every use case.

If you find something not working, please provide example with issue.

@mskocik mskocik added the question Further information is requested label May 3, 2024
@macsupport
Copy link
Author

I really appreciate your example. It helped quite a bit but still having troubles with other CSS overriding Svelecte but working on it.

@mskocik
Copy link
Owner

mskocik commented May 6, 2024

Sure, let me know it you encounter something that is impossible to customize or some additional CSS property should/could be exposed.
And with some test scenario (similar to what I posted) so I would be able to take a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants