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


PHP CSS::css方法代码示例

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


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

示例1: parse

 /**
  * The main processing function called by Scaffold. MUST return $css!
  *
  * @author Anthony Short
  * @return $css string
  */
 public static function parse()
 {
     $xml = CSS::to_xml();
     $css = "";
     foreach ($xml->rule as $key => $value) {
         $css .= self::parse_rule($value);
     }
     CSS::$css = CSS::convert_entities('decode', $css);
 }
开发者ID:Keukendeur,项目名称:csscaffold,代码行数:15,代码来源:NestedSelectors.php

示例2: parse

 /**
  * This function occurs before everything else
  *
  * @author Anthony Short
  * @param $css
  */
 public static function parse()
 {
     # Find all the @server imports
     CSS::$css = self::server_import(CSS::$css);
 }
开发者ID:Keukendeur,项目名称:csscaffold,代码行数:11,代码来源:Import.php

示例3: replace

 /**
  * Replaces a matched string with another matched string.
  * Can be either a direct string replace or a regular expression.
  *
  * @author Anthony Short
  * @param $match The string to match
  * @param $replace Replace the match with this string
  * @param $regex Is it a regular expression
  * @return null
  */
 public static function replace($match, $replace, $regex = false)
 {
     if ($regex === true) {
         if (self::$css = preg_replace($match, $replace, self::$css)) {
             return true;
         }
     } else {
         if (self::$css = str_replace($match, $replace, self::$css)) {
             return true;
         }
     }
     FB::log("CSS::replace - nothing to replace: " . $match);
 }
开发者ID:pdclark,项目名称:csscaffold,代码行数:23,代码来源:CSS.php

示例4: parse_css

 /**
  * Parse the CSS
  *
  * @return string - The processes css file as a string
  * @author Anthony Short
  **/
 public static function parse_css()
 {
     # If the cache is stale or doesn't exist
     if (self::config('core.cache.mod_time') <= self::config('core.request.mod_time')) {
         # Start the timer
         Benchmark::start("parse_css");
         # Compress it before parsing
         CSS::compress(CSS::$css);
         # Import CSS files
         Import::parse();
         if (self::config('core.auto_include_mixins') === true) {
             # Import the mixins in the plugin/module folders
             Mixins::import_mixins('framework/mixins');
         }
         # Parse our css through the plugins
         foreach (self::$plugins as $plugin) {
             call_user_func(array($plugin, 'import_process'));
         }
         # Compress it before parsing
         CSS::compress(CSS::$css);
         # Parse the constants
         Constants::parse();
         foreach (self::$plugins as $plugin) {
             call_user_func(array($plugin, 'pre_process'));
         }
         # Parse the @grid
         Layout::parse_grid();
         # Replace the constants
         Constants::replace();
         # Parse @for loops
         Iteration::parse();
         foreach (self::$plugins as $plugin) {
             call_user_func(array($plugin, 'process'));
         }
         # Compress it before parsing
         CSS::compress(CSS::$css);
         # Parse the mixins
         Mixins::parse();
         # Find missing constants
         Constants::replace();
         # Compress it before parsing
         CSS::compress(CSS::$css);
         foreach (self::$plugins as $plugin) {
             call_user_func(array($plugin, 'post_process'));
         }
         # Parse the expressions
         Expression::parse();
         # Parse the nested selectors
         NestedSelectors::parse();
         # Convert all url()'s to absolute paths if required
         if (self::config('core.absolute_urls') === true) {
             CSS::convert_to_absolute_urls();
         }
         # Replaces url()'s that start with ~ to lead to the CSS directory
         CSS::replace_css_urls();
         # Add the extra string we've been storing
         CSS::$css .= CSS::$append;
         # If they want to minify it
         if (self::config('core.minify_css') === true) {
             Minify::compress();
         } else {
             CSS::pretty();
         }
         # Formatting hook
         foreach (self::$plugins as $plugin) {
             call_user_func(array($plugin, 'formatting_process'));
         }
         # Validate the CSS
         if (self::config('core.validate') === true) {
             Validate::check();
         }
         # Stop the timer...
         Benchmark::stop("parse_css");
         if (self::config('core.show_header') === TRUE) {
             CSS::$css = "/* Processed by CSScaffold on " . gmdate('r') . " in " . Benchmark::get("parse_css", "time") . " seconds */\n\n" . CSS::$css;
         }
         # Write the css file to the cache
         self::cache_write(CSS::$css);
         # Output process hook for plugins to display views.
         # Doesn't run in production mode.
         if (!IN_PRODUCTION) {
             foreach (array_merge(self::$plugins, self::$modules) as $plugin) {
                 call_user_func(array($plugin, 'output'));
             }
         }
     }
 }
开发者ID:Keukendeur,项目名称:csscaffold,代码行数:93,代码来源:CSScaffold.php

示例5: compress

 public static function compress()
 {
     self::load_library('Minify_Compressor');
     CSS::$css = Minify_CSS_Compressor::process(CSS::$css);
 }
开发者ID:pdclark,项目名称:csscaffold,代码行数:5,代码来源:Minify.php

示例6: post_process

 public static function post_process()
 {
     CSS::$css = self::parse_expressions();
 }
开发者ID:naonak,项目名称:Expression2,代码行数:4,代码来源:Expression2.php


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