当前位置: 首页>>代码示例>>PHP>>正文


PHP Essential_Grid_Base::compress_css方法代码示例

本文整理汇总了PHP中Essential_Grid_Base::compress_css方法的典型用法代码示例。如果您正苦于以下问题:PHP Essential_Grid_Base::compress_css方法的具体用法?PHP Essential_Grid_Base::compress_css怎么用?PHP Essential_Grid_Base::compress_css使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Essential_Grid_Base的用法示例。


在下文中一共展示了Essential_Grid_Base::compress_css方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: output_global_css_styles_wrapped

 /**
  * echo global CSS with wrapper
  */
 public static function output_global_css_styles_wrapped()
 {
     $base = new Essential_Grid_Base();
     echo '<style type="text/css">';
     echo $base->compress_css(self::get_global_css_styles());
     echo '</style>' . "\n";
 }
开发者ID:Lumbe,项目名称:dev_servus,代码行数:10,代码来源:global-css.class.php

示例2: output_navigation_skins

 public static function output_navigation_skins()
 {
     $base = new Essential_Grid_Base();
     $skins = self::get_essential_navigation_skins();
     $css = '';
     if (!empty($skins)) {
         foreach ($skins as $skin) {
             $css .= '<style class="navigation-skin-css-' . $skin['id'] . '" type="text/css">';
             $css .= $base->compress_css($skin['css']);
             $css .= '</style>' . "\n";
         }
     }
     return $css;
 }
开发者ID:mertyildiran,项目名称:grandinsaat,代码行数:14,代码来源:navigation.class.php

示例3: output_element_css_by_meta

 public function output_element_css_by_meta()
 {
     $base = new Essential_Grid_Base();
     $disallowed = array('transition', 'transition-delay');
     $allowed_wrap_styles = Essential_Grid_Item_Element::get_allowed_styles_for_wrap();
     $post_Class = !isset($post['ID']) ? '' : $post['ID'];
     $p_class = '.eg-post-' . $post_Class;
     if (!empty($this->layers_meta_css['idle'])) {
         echo '<style type="text/css">';
         $css = '';
         foreach ($this->layers_meta_css['idle'] as $class => $settings) {
             $forbidden = array();
             if (!empty($this->add_css_wrap) && isset($this->add_css_wrap[$class])) {
                 $forbidden = $allowed_wrap_styles;
             }
             //write hover only if no tag inside the text exists
             $d_i = $this->layers_css[$this->id]['settings'][$class]['important'];
             //add important or not
             if (!empty($settings)) {
                 $css .= '.' . $class . $p_class . ' {' . "\n";
                 foreach ($settings as $style => $value) {
                     if (!in_array($style, $forbidden) && !in_array($style, $disallowed)) {
                         $css .= '	' . $style . ': ' . stripslashes($value) . $d_i . ';' . "\n";
                     }
                 }
                 $css .= '}' . "\n";
             }
         }
         echo $base->compress_css($css);
         echo '</style>' . "\n";
     }
     if (!empty($this->layers_meta_css['hover'])) {
         echo '<style type="text/css">';
         $css = '';
         foreach ($this->layers_meta_css['hover'] as $class => $settings) {
             if (!empty($this->add_css_tags) && isset($this->add_css_tags[$class])) {
                 continue;
             }
             //write hover only if no tag inside the text exists
             $d_i = $this->layers_css[$this->id]['settings'][$class]['important'];
             //add important or not
             if (!empty($settings)) {
                 $css .= '.' . $class . $p_class . ':hover {' . "\n";
                 foreach ($settings as $style => $value) {
                     $css .= '	' . $style . ': ' . stripslashes($value) . $d_i . ';' . "\n";
                 }
                 $css .= '}' . "\n";
             }
         }
         echo $base->compress_css($css);
         echo '</style>' . "\n";
     }
     //check for custom css on tags
     if (!empty($this->add_css_tags)) {
         $allowed_styles = Essential_Grid_Item_Element::get_allowed_styles_for_tags();
         foreach ($this->add_css_tags as $class => $tags) {
             if (!empty($this->layers_meta_css['idle'][$class])) {
                 // we write the idle styles
                 $d_i = $this->layers_css[$this->id]['settings'][$class]['important'];
                 //add important or not
                 foreach ($tags as $tag => $do) {
                     echo '<style type="text/css">';
                     $css = '';
                     $css .= '.' . $class . $p_class . ' ' . $tag . ' {' . "\n";
                     foreach ($this->layers_meta_css['idle'][$class] as $style => $value) {
                         if (in_array($style, $allowed_styles)) {
                             $css .= '	' . $style . ': ' . stripslashes($value) . $d_i . ';' . "\n";
                         }
                     }
                     $css .= '}' . "\n";
                     echo $base->compress_css($css);
                     echo '</style>' . "\n";
                 }
             }
             if (!empty($this->layers_meta_css['hover'][$class])) {
                 // we write the hover styles
                 $d_i = $this->layers_css[$this->id]['settings'][$class]['important'];
                 //add important or not
                 foreach ($tags as $tag => $do) {
                     echo '<style type="text/css">';
                     $css = '';
                     $css .= '.' . $class . $p_class . ' ' . $tag . ':hover {' . "\n";
                     foreach ($this->layers_meta_css['hover'][$class] as $style => $value) {
                         if (in_array($style, $allowed_styles)) {
                             $css .= '	' . $style . ': ' . stripslashes($value) . $d_i . ';' . "\n";
                         }
                     }
                     $css .= '}' . "\n";
                     echo $base->compress_css($css);
                     echo '</style>' . "\n";
                 }
             }
         }
     }
     //check for custom css on wrappers for example
     if (!empty($this->add_css_wrap)) {
         $allowed_cat_tag_styles = Essential_Grid_Item_Element::get_allowed_styles_for_cat_tag();
         foreach ($this->add_css_wrap as $class => $tags) {
             if (!empty($this->layers_meta_css['idle'][$class])) {
                 // we write the idle styles
//.........这里部分代码省略.........
开发者ID:NgocSon2412,项目名称:website_banhang,代码行数:101,代码来源:item-skin.class.php


注:本文中的Essential_Grid_Base::compress_css方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。