Code Monkey home page Code Monkey logo

Comments (8)

minikN avatar minikN commented on May 18, 2024 2

@rbarcelos @alexandru-paduraru Alright so the problem is pretty simple to describe. It occurs if you use the Material Wizard and the Material Kit together. In my case, I use the Material Wizard as a modal inside my project, which also uses the Material Kit. So in this scenario, I use both the wizard's css and the kit's css files, and at at least one point, they collide.

In Material Kit, if you use nav pills, an anchor tag (<a href="#">Link</a>) gets applied a box-shadow by default (official documentation):

<ul class="nav nav-pills nav-pills-primary" role="tablist">
	<li>
		<a href="#dashboard" role="tab" data-toggle="tab"> **// <-- THIS TAG** 
			<i class="material-icons">dashboard</i>
			Dashboard
		</a>
	</li>
</ul>

This is defined in material-kit/_pills.scss in line 31, 44, 57, 70 and 83. It's a block of code that gets repeated for every color (primary, success, warning, ....)

Example:

    &.nav-pills-info{
        > li {
            &.active > a{
                &,
                &:focus,
                &:hover{
                    background-color: $brand-info;
                    @include shadow-big-color($brand-info); **// THIS LINE**
                }
            }
        }
    }

So moving on to the wizard now, because it uses nav pills as well to build up the navigation, the above described rules get applied as well.

If you inspect your official wizard demo with chrome dev tools, you can see how you build up the wizard navigation:

<div class="wizard-navigation">
  <ul class="nav nav-pills">
    <li class="active"><a href="#details" data-toggle="tab" aria-expanded="true">Account</a></li>
    <li><a href="#captain" data-toggle="tab">Room Type</a></li>
    <li><a href="#description" data-toggle="tab">Extra Details</a></li>
  </ul>
  <div class="moving-tab" style="width: 250px; transform: translate3d(-8px, 0px, 0px); transition:   transform 0s;">Account</div>
</div>

As you can see it's the same setup: ul.nav-pills > li > &:active > a > &:hover. Because the material kit assets are being used as well, material kit is unintentionally applying the shadow.

I hope this explanation makes clear what's going on. I fixed this issue by applying a block of scss to counter the behaviour. I did not want to alter the source files, hence why I use my own scss file with all my alternations.

.wizard-navigation {
  >.nav-pills{
      > li {
          &.active > a{
              &,
              &:focus,
              &:hover{
                  box-shadow: none;
              }
          }

      }
  } 
}

This block of scss ensures the applied shadow by material kit gets removed again, but only if the ul.nav-pills is inside a div.wizard-navigation to make sure I don't alter the intended nav-pills behaviour across all material kit.

I hope this helps.

from material-bootstrap-wizard.

minikN avatar minikN commented on May 18, 2024

This is caused by

@include shadow-big-color($brand-info);

inside _pills.scss.

It applies to the anchor tags inside of li items.

from material-bootstrap-wizard.

rbarcelos avatar rbarcelos commented on May 18, 2024

What do we need to fix it? comment the include?

Thanks

from material-bootstrap-wizard.

alexandru-paduraru avatar alexandru-paduraru commented on May 18, 2024

@minikN @rbarcelos can you please share with us a link with the problem? From Laravel viewer, I can see only the code, not the final result. In this way, I will check and give you a solution. Something on https://jsfiddle.net/ would help.

Best,
Alex

from material-bootstrap-wizard.

minikN avatar minikN commented on May 18, 2024

I am not at home at the Moment. Give me a couple oft hours and I will describe what's causing the issue and hownI fixed it.

from material-bootstrap-wizard.

alexandru-paduraru avatar alexandru-paduraru commented on May 18, 2024

@minikN wow! That makes sense.

Congrats for the deep investigation. We will think of a way to fix this, but from what I see now, the best option is the one described by you, in this way the Material Kit is not altered and the problem in the wizard is fixed. So in a future update, we will make sure this will be included :D

Best,
Alex

from material-bootstrap-wizard.

minikN avatar minikN commented on May 18, 2024

@alexandru-paduraru always happy to help. The stuff you are offering for free is great. Loving it.

from material-bootstrap-wizard.

nworks16 avatar nworks16 commented on May 18, 2024

What is the correct way to make the wizard after reaching the end return to the first tab? Is there a function to return to the first tab? and show it. using javascript

from material-bootstrap-wizard.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.