Comments (8)
@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.
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.
What do we need to fix it? comment the include?
Thanks
from material-bootstrap-wizard.
@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.
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.
@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.
@alexandru-paduraru always happy to help. The stuff you are offering for free is great. Loving it.
from material-bootstrap-wizard.
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)
- how to upgrade bootstrap 4.0 HOT 3
- Various issues when used with Material Kit / Bootstrap 3 from CDN, BS4 HOT 1
- material-bootstrap-wizard radio button not working on Iphone HOT 1
- Issues with tab - material-bootstrap-wizard HOT 5
- Possible way to replicate like Fundraisup Donate Widget? HOT 2
- [Request] Convert to bootstrap 4.1
- Automatically crop selected image to a square HOT 3
- Style issue on diffent browser HOT 3
- next step direct link HOT 5
- center position of whole form HOT 1
- modal trick needed HOT 3
- Onchange on checkbox
- Disable radio buttons function
- input type radio doesnt return name value upon post request HOT 1
- wizard-build-profile checkbox onChange is not firing HOT 2
- Custom Colour
- Dynamically generated radio do not respond to events
- How to navigate between tabs without filling all inputs?
- Floating label does not float HOT 1
- Move to next tab programmatically
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from material-bootstrap-wizard.