Skip to content

Giving the value to "to" prop inside "b-navbar-nav" makes the web page behave in a weird way #6258

Answered by Hiws
platput asked this question in Q&A
Discussion options

You must be logged in to vote

Nevermind, I forked the codesandbox and removed core-js which removed all the errors.

The issue you're having is because of the unscoped styles found in pages/index.vue.
Mainly the styling applied to .container

.container {
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

When you don't use scoped on your <style> tags, in a component it will bleed into other components/pages. To avoid this you have to add scoped to the <style> tag. <style scoped>.

The reason this is only happening when using the to drop, is because the to prop renderes a <nuxt-link>, which doesn't cause a page redirect, but instead just swaps…

Replies: 6 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by platput
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@Hiws
Comment options

@KalubowilaDMR
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants
Converted from issue

This discussion was converted from issue #6258 on December 28, 2020 10:51.