Skip to content

Instantly share code, notes, and snippets.

@jameswilson
Last active March 5, 2021 19:59
Show Gist options
  • Select an option

  • Save jameswilson/8934896 to your computer and use it in GitHub Desktop.

Select an option

Save jameswilson/8934896 to your computer and use it in GitHub Desktop.

Revisions

  1. jameswilson revised this gist Feb 11, 2014. 2 changed files with 0 additions and 6 deletions.
    5 changes: 0 additions & 5 deletions responsive-modal.css
    Original file line number Diff line number Diff line change
    @@ -1,8 +1,3 @@
    /*
    * @file
    * rooms-responsive-modal.css
    */

    /* Override inline dom styles from modal.js */
    #modalContent {
    position: fixed !important;
    1 change: 0 additions & 1 deletion template.php
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,3 @@

    /**
    * Implementes template_preprocess_html().
    */
  2. jameswilson created this gist Feb 11, 2014.
    22 changes: 22 additions & 0 deletions responsive-modal.css
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,22 @@
    /*
    * @file
    * rooms-responsive-modal.css
    */

    /* Override inline dom styles from modal.js */
    #modalContent {
    position: fixed !important;
    top: 12% !important;
    bottom: 12% !important;
    right: 4% !important;
    left: 4% !important;
    }
    /* Limit max width to 1000px */
    div.ctools-modal-content {
    width: 100% !important;
    margin: 0 auto;
    max-width: 1000px;
    }
    div.ctools-modal-content .modal-content {
    width: 100% !important;
    }
    13 changes: 13 additions & 0 deletions template.php
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@

    /**
    * Implementes template_preprocess_html().
    */
    function mytheme_preprocess_html(&$variables) {
    // Override ctools modal.css
    $css = drupal_add_css();
    foreach($css as $key => $value) {
    if (strpos($key, 'ctools/css/modal.css') !== FALSE) {
    drupal_add_css(drupal_get_path('theme', 'mytheme') . '/css/responsive-modal.css');
    }
    }
    }