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

Bootstrap 4 + #70

Open
djjohnson-net opened this issue Jan 16, 2018 · 3 comments
Open

Bootstrap 4 + #70

djjohnson-net opened this issue Jan 16, 2018 · 3 comments

Comments

@djjohnson-net
Copy link

djjohnson-net commented Jan 16, 2018

The nav-link Tag Helper does not work correctly with Bootstrap 4 beta 3. The selected navigation is the same as the rest of the navigation.

My Bad I had to overwrite active to see any difference. Below is what I added to my custum css to get the results I was looking for.

.navbar-nav > .active > a {
color: black;
font-weight: bold;
}

.nav-item > a:hover {
color: black;
font-weight: bold;
}

@dpaquette
Copy link
Owner

I would expect most of the bootstrap tag helpers do not work correctly with Bootstrap 4. Bootstrap 4 is not backwards compatible with Bootstrap 3 and would require a new set of tag helpers.

@manojkulkarni30
Copy link
Contributor

Hi @dpaquette,

I have created a simple tag helper for creating a bootstrap 4 card. Below is the simple structure that i have created:

<card style="width: 18rem;" background="Success">
    <card-header>Header For Card</card-header>
    <card-body>
        <p class="card-text">Card Text</p>
    </card-body>
    <card-footer>Footer For Card</card-footer>
</card>

Card tag helper contains properties for setting the background and border color also. Also created a card image tag helper for inserting image in card.

Can i contribute this tag helper ? Is there any suggestion to improve the structure

@spSlaine
Copy link

Bootstrap 4 requires the a tag to have the class nav-item e.g.

<div class="collapse navbar-collapse" id="navbarSupportedContent">
    <ul class="navbar-nav mr-auto">
      <li class="nav-item active">
        <a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a>
      </li>
      <li class="nav-item">
        <a class="nav-link" href="#">Link</a>
      </li>
    </ul>
</div>

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

4 participants