On Zurb Foundation base theme, Modal reveal works.
modal reveal base theme working example
When I run drush fst subtheme_name, it does not work.
modal reveal not working example

Comments

nsciacca’s picture

In the starter theme's scss/base/_drupal.scss it's setting the z-index to be below the default for the reveal modal bg (1004):

// Fix Zurb Foundation Reveal Modal z-index and make it play nice with dropdown
// menus, lightboxes, etc.
.reveal-modal {
  z-index: 999;
}

I was able to fix the background positioning by adding this:

// Fix Zurb Foundation Reveal Modal z-index and make it play nice with dropdown
// menus, lightboxes, etc.
.reveal-modal {
  z-index: 999;
}
.reveal-modal-bg {
  z-index: 998;
}

This fixes the styles, but I can't seem to get the close button to work - any thoughts?

istryker’s picture

yes that did it, changing the background index to 998 fix the problem.

If by close button you mean the X in the top-right, I had no problem with it after I changed the bg z-index to 998.

nsciacca’s picture

Title: Modal Reveal not working in subtheme » Modal Reveal not working in subtheme (css issue) & for status messages (attribute)
Status: Active » Needs review
StatusFileSize
new306.59 KB

Yeah, it seems that using the theme option to show status messages in the reveal is missing an attribute for "data-reveal", which in turn breaks the closing functionality.

I have attached a patch that fixes the scss & css in the STARTER theme as well as the missing attribute.

nmillin’s picture

Patch by nsciacca worked for me. I was able to patch my existing sub-theme. Thanks!

torgospizza’s picture

While the patch did not apply for me, I think the solution was mainly to set the z-index for the bg element, and ensure that the output has the correct attributes, and the problem for me was solved.

zonesny’s picture

Likewise, I successfully applied patch in #3 (ran it with -p1 option in terminal, i.e. patch -p1 < modal_reveal-2465653.patch). Fixed same modal issue for me. Thanks nsciacca!

torgospizza’s picture

Status: Needs review » Reviewed & tested by the community

Seems this is RTBC then!

interdruper’s picture

#3 fixes the issue for me too.

hongpong’s picture

Status: Reviewed & tested by the community » Needs review

There is a big CSS change included in this patch? If we straighten this out I can commit it. Probably after updating composer.json to 6.3.1, then this patch will be much slimmer.