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 add class from css framework? #16

Open
rzwibowo opened this issue Feb 12, 2020 · 4 comments
Open

How to add class from css framework? #16

rzwibowo opened this issue Feb 12, 2020 · 4 comments

Comments

@rzwibowo
Copy link

rzwibowo commented Feb 12, 2020

Result: input field doubled, in the back is styled input, and in the front is v-suggest styled input
image

Expected: input field styled according to class applied from css framework (eg.: bootstrap with .form-control)

@TerryZ
Copy link
Owner

TerryZ commented Feb 12, 2020

Try to add class attribute directly.

<v-suggest :data="data" class="the class you want">
</v-suggest>

@rzwibowo
Copy link
Author

Try to add class attribute directly.

<v-suggest :data="data" class="the class you want">
</v-suggest>

I've been playing around in your codepen example and the result is like the screenshot I attached on my first edited issue comment

@TerryZ
Copy link
Owner

TerryZ commented Feb 18, 2020

v-suggest dom elements structure like below:
image

You have to write some css style to overwrite the original css content

/* the css(scss) content in your page */
div.v-suggest {
  input[type=text] {
    /* the css content you want to customize */
  }
}

@rzwibowo
Copy link
Author

Yup, it's what I planned to try before. With your answer, now I know what specific selector I should overwrite. Thanks for your kind response!

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

2 participants