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

Add z-index to Tribute configuration #307

Merged
merged 3 commits into from
Oct 3, 2019

Conversation

iskandiar
Copy link
Contributor

@iskandiar iskandiar commented Aug 19, 2019

Right now z-index was set it two places:

  • in styles ( z-index: 999999;)
  • hardcoded in DOM when generating a menu container ( z-index: 10000;)

It was impossible to override hardcoded value without using !important declaration.

My case:
I have a modal that has z-index: 900000; and I want to show menu container over my modal. I have to override basic tribute styles and add !important (which is not the best practice):

.tribute-container{
   z-index: 999999 !important;
  ....
}

My solution is adding zIndex to Tribute config, by default, it is set to 10000 as it was before, so it should not break anything.

I removed hardcoded z-index value from tribute menu container.

@mrsweaters
Copy link
Collaborator

I think we should change the approach here. We should remove it from the JS and only set the z-index in styles so that the z-index can more easily be overwritten.

@iskandiar
Copy link
Contributor Author

@mrsweaters I removed a hardcoded value, but on the other hand it may break some stuff now.

if someone depends on hardcoded value, after upgrade it won't be applied anymore. In the previous solution, it was extending component in this way, that it should not break anything.

@mrsweaters mrsweaters merged commit 10b9354 into zurb:master Oct 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants