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 to set custom styles for the button? #53

Closed
Rahulgans opened this issue Feb 12, 2018 · 3 comments
Closed

How to set custom styles for the button? #53

Rahulgans opened this issue Feb 12, 2018 · 3 comments
Labels

Comments

@Rahulgans
Copy link

Rahulgans commented Feb 12, 2018

.vue-js-switch{

     position: absolute;
     top:40%;
     z-index:1;
}

.vue-js-switch .v-switch-core{
    background-color: #2980b9!important;
}

.vue-js-switch .v-switch-button {
   border-radius: 0px!important;
}

Only the vue-js-switch class worked. Even after using !important, there seems to be no change.

@euvl
Copy link
Owner

euvl commented Feb 12, 2018

i assume you have tried with child combinator .vue-js-switch > .v-switch-core?

Also the easiest way would be just to open an inspector and copy-paste class directly from the component.

@euvl euvl added the question label Feb 12, 2018
@euvl euvl closed this as completed Mar 1, 2018
@tb-b
Copy link

tb-b commented Mar 12, 2018

Same here. v-switch-input works, nested elements cannot be targeted via <style> block (inline works).

@Rahulgans
Copy link
Author

@tombalev. If you are using single file component, try writing the custom styles under a separate <style> rather than the component's scoped style. Haven't tried it for this plugin, but worked for me in other Vue components

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

No branches or pull requests

3 participants