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

How can we theme the vSelect #30

Closed
nacr opened this issue Apr 13, 2016 · 5 comments
Closed

How can we theme the vSelect #30

nacr opened this issue Apr 13, 2016 · 5 comments

Comments

@nacr
Copy link

nacr commented Apr 13, 2016

Is there any support for themes?

And if so how can it be done?

tks

@sagalbot
Copy link
Owner

There aren't any pre-made themes at the moment. We discussed it in PR #16 but decided that it was unlikely the themes we produce are going to line up with a given users design. If I was wrong about that, I'm happy to merge #16. At the moment, your best bet would be write your own styles from an external stylesheet.

What are you looking for in terms of themes?

@sagalbot
Copy link
Owner

For example, on the demo site, I've just added an ID to the element and add some simple styles to change the colors a bit:

/* Cyan theme */
#v-select .selected-tag {
    color: #147688;
    background-color: #d7f3f9;
    border-color: #91ddec;
}

#v-select.dropdown.open .dropdown-toggle,
#v-select.dropdown.open .dropdown-menu {
    border-color: #4CC3D9;
}

#v-select .active a {
    background: rgba(50,50,50,.1);
    color: #333;
}

#v-select.dropdown .highlight a,
#v-select.dropdown li:hover a {
    background: #4CC3D9;
    color: #fff;
}

@nacr
Copy link
Author

nacr commented Apr 14, 2016

Ok will take a look.

Some how I did not get this working yesterday.

@nacr
Copy link
Author

nacr commented Apr 14, 2016

ok Face Palme for me :)

tks m:8ball:

@nacr nacr closed this as completed Apr 14, 2016
@cleitonsouza
Copy link

cleitonsouza commented May 17, 2017

Sorry for re opening this issue

I took a look in PR #16, but i got the following conclusion: to add my own style for this component, i need to override the current style. I'm right?

If so, then i have a suggestion: add a new prop, like theme, and define a default theme, that have the current style. This will add a classe in the root element default-theme, and the style will be writen like: .default-theme .dropdown-toggle, etc..

In this way, when we pass <v-select theme="my-own">, we can develop the style from scratch

Thanks

If you agree, i will make a PR with this :)

susnux pushed a commit to susnux/vue-select that referenced this issue Jul 16, 2024
enh(a11y): Improve accessibility with correct attributes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants