Changeset 81332 in spip-zone
- Timestamp:
- Mar 13, 2014, 11:27:57 AM (7 years ago)
- Location:
- _core_/branches/spip-3.0/plugins/compresseur
- Files:
-
- 8 deleted
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
_core_/branches/spip-3.0/plugins/compresseur/lib/csstidy/README
r63080 r81332 3 3 4 4 CSSTidy is a CSS minifier 5 Since the original project (http://csstidy.sourceforge.net/index.php) has been suspended 6 here is the import of https://csstidy.svn.sourceforge.net/svnroot/csstidy on 2010-11-14 5 6 v1.5.2 7 is PHP 5.4+ compliant, removes use of GLOBALS, fixes some bugs, integrates CSS3 units 8 and now available on https://packagist.org/packages/cerdic/css-tidy 7 9 8 10 v1.4 is the new version coming from master branch (corresponds to the initial trunk of svn repository) after beeing stabilized … … 10 12 v1.3 branch corresponds to the last stable relase published by the author. 11 13 It integrates some bugfixes and a 1.3.1 version has been taged 14 Since the original project (http://csstidy.sourceforge.net/index.php) has been suspended 15 here is the import of https://csstidy.svn.sourceforge.net/svnroot/csstidy on 2010-11-14 12 16 13 17 Only PHP version is here maintained -
_core_/branches/spip-3.0/plugins/compresseur/lib/csstidy/class.csstidy.php
r63080 r81332 30 30 * @author Cedric Morin (cedric at yterium dot com) 2010-2012 31 31 * @author Christopher Finke (cfinke at gmail.com) 2012 32 * @author Mark Scherer (remove $GLOBALS once and for all + PHP5.4 comp) 2012 32 33 */ 34 33 35 /** 34 36 * Defines ctype functions if required 35 * 37 * @todo make them methods of csstidy class 36 38 * @version 1.0 37 39 */ 38 require_once('class.csstidy_ctype.php'); 40 if (!function_exists('ctype_space')) { 41 /* ctype_space Check for whitespace character(s) */ 42 function ctype_space($text) { 43 return!preg_match("/[^\s\r\n\t\f]/", $text); 44 } 45 46 } 47 if (!function_exists('ctype_alpha')) { 48 /* ctype_alpha Check for alphabetic character(s) */ 49 function ctype_alpha($text) { 50 return preg_match("/[a-zA-Z]/", $text); 51 } 52 53 } 39 54 40 55 /** 41 * Various CSS data needed for correct optimisations etc. 42 * 43 * @version 1.3 56 * Defines constants 57 * @todo //TODO: make them class constants of csstidy 44 58 */ 45 require('data.inc.php'); 59 define('AT_START', 1); 60 define('AT_END', 2); 61 define('SEL_START', 3); 62 define('SEL_END', 4); 63 define('PROPERTY', 5); 64 define('VALUE', 6); 65 define('COMMENT', 7); 66 define('DEFAULT_AT', 41); 46 67 47 68 /** … … 62 83 * CSS Parser class 63 84 * 64 65 85 * This class represents a CSS parser which reads CSS code and saves it in an array. 66 86 * In opposite to most other CSS parsers, it does not use regular expressions and … … 70 90 * @package csstidy 71 91 * @author Florian Schmitz (floele at gmail dot com) 2005-2006 72 * @version 1. 4.092 * @version 1.5.2 73 93 */ 74 94 class csstidy { … … 79 99 * @access public 80 100 */ 81 var$css = array();101 public $css = array(); 82 102 /** 83 103 * Saves the parsed CSS (raw) … … 85 105 * @access private 86 106 */ 87 var$tokens = array();107 public $tokens = array(); 88 108 /** 89 109 * Printer class … … 92 112 * @access public 93 113 */ 94 var$print;114 public $print; 95 115 /** 96 116 * Optimiser class … … 99 119 * @access private 100 120 */ 101 var$optimise;121 public $optimise; 102 122 /** 103 123 * Saves the CSS charset (@charset) … … 105 125 * @access private 106 126 */ 107 var$charset = '';127 public $charset = ''; 108 128 /** 109 129 * Saves all @import URLs … … 111 131 * @access private 112 132 */ 113 var$import = array();133 public $import = array(); 114 134 /** 115 135 * Saves the namespace … … 117 137 * @access private 118 138 */ 119 var$namespace = '';139 public $namespace = ''; 120 140 /** 121 141 * Contains the version of csstidy … … 123 143 * @access private 124 144 */ 125 var $version = '1.3';145 public $version = '1.5.2'; 126 146 /** 127 147 * Stores the settings … … 129 149 * @access private 130 150 */ 131 var$settings = array();151 public $settings = array(); 132 152 /** 133 153 * Saves the parser-status. … … 144 164 * @access private 145 165 */ 146 var$status = 'is';166 public $status = 'is'; 147 167 /** 148 168 * Saves the current at rule (@media) … … 150 170 * @access private 151 171 */ 152 var$at = '';172 public $at = ''; 153 173 /** 154 174 * Saves the at rule for next selector (during @font-face or other @) … … 156 176 * @access private 157 177 */ 158 var$next_selector_at = '';178 public $next_selector_at = ''; 159 179 160 180 /** … … 163 183 * @access private 164 184 */ 165 var$selector = '';185 public $selector = ''; 166 186 /** 167 187 * Saves the current property … … 169 189 * @access private 170 190 */ 171 var$property = '';191 public $property = ''; 172 192 /** 173 193 * Saves the position of , in selectors … … 175 195 * @access private 176 196 */ 177 var$sel_separate = array();197 public $sel_separate = array(); 178 198 /** 179 199 * Saves the current value … … 181 201 * @access private 182 202 */ 183 var$value = '';203 public $value = ''; 184 204 /** 185 205 * Saves the current sub-value … … 192 212 * @access private 193 213 */ 194 var$sub_value = '';214 public $sub_value = ''; 195 215 /** 196 216 * Array which saves all subvalues for a property. … … 199 219 * @access private 200 220 */ 201 var$sub_value_arr = array();221 public $sub_value_arr = array(); 202 222 /** 203 223 * Saves the stack of characters that opened the current strings … … 205 225 * @access private 206 226 */ 207 var$str_char = array();208 var$cur_string = array();227 public $str_char = array(); 228 public $cur_string = array(); 209 229 /** 210 230 * Status from which the parser switched to ic or instr … … 212 232 * @access private 213 233 */ 214 var$from = array();234 public $from = array(); 215 235 /** 216 236 /** … … 219 239 * @access private 220 240 */ 221 var$invalid_at = false;241 public $invalid_at = false; 222 242 /** 223 243 * =true if something has been added to the current selector … … 225 245 * @access private 226 246 */ 227 var$added = false;247 public $added = false; 228 248 /** 229 249 * Array which saves the message log … … 231 251 * @access private 232 252 */ 233 var$log = array();253 public $log = array(); 234 254 /** 235 255 * Saves the line number … … 237 257 * @access private 238 258 */ 239 var$line = 1;259 public $line = 1; 240 260 /** 241 261 * Marks if we need to leave quotes for a string … … 243 263 * @access private 244 264 */ 245 var$quoted_string = array();265 public $quoted_string = array(); 246 266 247 267 /** … … 249 269 * @var string 250 270 */ 251 var $tokens_list = ""; 271 public $tokens_list = ""; 272 273 /** 274 * Various CSS Data for CSSTidy 275 * @var array 276 */ 277 public $data = array(); 278 252 279 /** 253 280 * Loads standard template and sets default settings … … 255 282 * @version 1.3 256 283 */ 257 function csstidy() { 284 public function __construct() { 285 $data = array(); 286 include('data.inc.php'); 287 $this->data = $data; 288 258 289 $this->settings['remove_bslash'] = true; 259 290 $this->settings['compress_colors'] = true; … … 261 292 $this->settings['lowercase_s'] = false; 262 293 /* 263 264 265 294 1 common shorthands optimization 295 2 + font property optimization 296 3 + background property optimization 266 297 */ 267 298 $this->settings['optimise_shorthands'] = 1; … … 274 305 $this->settings['sort_properties'] = false; 275 306 /* 276 277 278 307 1, 3, 5, etc -- enable sorting selectors inside @media: a{}b{}c{} 308 2, 5, 8, etc -- enable sorting selectors inside one CSS declaration: a,b,c{} 309 preserve order by default cause it can break functionnality 279 310 */ 280 311 $this->settings['sort_selectors'] = 0; … … 291 322 $this->optimise = new csstidy_optimise($this); 292 323 293 $this->tokens_list = & $ GLOBALS['csstidy']['tokens'];324 $this->tokens_list = & $this->data['csstidy']['tokens']; 294 325 } 295 326 … … 301 332 * @version 1.0 302 333 */ 303 function get_cfg($setting) {334 public function get_cfg($setting) { 304 335 if (isset($this->settings[$setting])) { 305 336 return $this->settings[$setting]; … … 314 345 * @version 1.4 315 346 */ 316 function _load_template($template) {347 public function _load_template($template) { 317 348 switch ($template) { 318 349 case 'default': … … 346 377 * @version 1.0 347 378 */ 348 function set_cfg($setting, $value=null) {379 public function set_cfg($setting, $value=null) { 349 380 if (is_array($setting) && $value === null) { 350 381 foreach ($setting as $setprop => $setval) { … … 355 386 } 356 387 return true; 357 } else 388 } elseif (isset($this->settings[$setting]) && $value !== '') { 358 389 $this->settings[$setting] = $value; 359 390 if ($setting === 'template') { … … 373 404 * @version 1.0 374 405 */ 375 function _add_token($type, $data, $do = false) {406 public function _add_token($type, $data, $do = false) { 376 407 if ($this->get_cfg('preserve_css') || $do) { 377 408 $this->tokens[] = array($type, ($type == COMMENT) ? $data : trim($data)); … … 387 418 * @version 1.0 388 419 */ 389 function log($message, $type, $line = -1) {420 public function log($message, $type, $line = -1) { 390 421 if ($line === -1) { 391 422 $line = $this->line; … … 406 437 * @version 1.2 407 438 */ 408 function _unicode(&$string, &$i) {439 public function _unicode(&$string, &$i) { 409 440 ++$i; 410 441 $add = ''; … … 453 484 * @version 1.4 454 485 */ 455 function write_page($filename, $doctype='xhtml1.1', $externalcss=true, $title='', $lang='en') {486 public function write_page($filename, $doctype='xhtml1.1', $externalcss=true, $title='', $lang='en') { 456 487 $this->write($filename, true); 457 488 } … … 469 500 * @version 1.4 470 501 */ 471 function write($filename, $formatted=false, $doctype='xhtml1.1', $externalcss=true, $title='', $lang='en', $pre_code=true) {502 public function write($filename, $formatted=false, $doctype='xhtml1.1', $externalcss=true, $title='', $lang='en', $pre_code=true) { 472 503 $filename .= ( $formatted) ? '.xhtml' : '.css'; 473 504 … … 498 529 * @see http://csstidy.sourceforge.net/templates.php 499 530 */ 500 function load_template($content, $from_file=true) {501 $predefined_templates = & $ GLOBALS['csstidy']['predefined_templates'];531 public function load_template($content, $from_file=true) { 532 $predefined_templates = & $this->data['csstidy']['predefined_templates']; 502 533 if ($content === 'high_compression' || $content === 'default' || $content === 'highest_compression' || $content === 'low_compression') { 503 534 $this->template = $predefined_templates[$content]; … … 523 554 * @version 1.0 524 555 */ 525 function parse_from_url($url) {556 public function parse_from_url($url) { 526 557 return $this->parse(@file_get_contents($url)); 527 558 } … … 534 565 * @version 1.11 535 566 */ 536 function is_token(&$string, $i) {537 return (strpos($this->tokens_list, $string{$i}) !== false && ! csstidy::escaped($string, $i));567 public function is_token(&$string, $i) { 568 return (strpos($this->tokens_list, $string{$i}) !== false && !$this->escaped($string, $i)); 538 569 } 539 570 … … 545 576 * @version 1.1 546 577 */ 547 function parse($string) {578 public function parse($string) { 548 579 // Temporarily set locale to en_US in order to handle floats properly 549 580 $old = @setlocale(LC_ALL, 0); … … 554 585 $this->optimise = new csstidy_optimise($this); 555 586 556 $all_properties = & $ GLOBALS['csstidy']['all_properties'];557 $at_rules = & $ GLOBALS['csstidy']['at_rules'];558 $quoted_string_properties = & $ GLOBALS['csstidy']['quoted_string_properties'];587 $all_properties = & $this->data['csstidy']['all_properties']; 588 $at_rules = & $this->data['csstidy']['at_rules']; 589 $quoted_string_properties = & $this->data['csstidy']['quoted_string_properties']; 559 590 560 591 $this->css = array(); … … 571 602 /* Case in at-block */ 572 603 case 'at': 573 if ( csstidy::is_token($string, $i)) {604 if ($this->is_token($string, $i)) { 574 605 if ($string{$i} === '/' && @$string{$i + 1} === '*') { 575 606 $this->status = 'ic'; … … 591 622 } else { 592 623 $lastpos = strlen($this->at) - 1; 593 if (!( (ctype_space($this->at{$lastpos}) || csstidy::is_token($this->at, $lastpos) && $this->at{$lastpos} === ',') && ctype_space($string{$i}))) {624 if (!( (ctype_space($this->at{$lastpos}) || $this->is_token($this->at, $lastpos) && $this->at{$lastpos} === ',') && ctype_space($string{$i}))) { 594 625 $this->at .= $string{$i}; 595 626 } … … 599 630 /* Case in-selector */ 600 631 case 'is': 601 if ( csstidy::is_token($string, $i)) {632 if ($this->is_token($string, $i)) { 602 633 if ($string{$i} === '/' && @$string{$i + 1} === '*' && trim($this->selector) == '') { 603 634 $this->status = 'ic'; … … 610 641 if (!strcasecmp(substr($string, $i + 1, strlen($name)), $name)) { 611 642 ($type === 'at') ? $this->at = '@' . $name : $this->selector = '@' . $name; 612 if ($type === "atis"){643 if ($type === 'atis') { 613 644 $this->next_selector_at = ($this->next_selector_at?$this->next_selector_at:($this->at?$this->at:DEFAULT_AT)); 614 645 $this->at = $this->css_new_media_section(' '); 615 $type = "is";646 $type = 'is'; 616 647 } 617 648 $this->status = $type; … … 638 669 $this->from[] = 'is'; 639 670 /* fixing CSS3 attribute selectors, i.e. a[href$=".mp3" */ 640 $this->quoted_string[] = ($string{$i - 1} == '=' );671 $this->quoted_string[] = ($string{$i - 1} === '=' ); 641 672 } elseif ($this->invalid_at && $string{$i} === ';') { 642 673 $this->invalid_at = false; 643 674 $this->status = 'is'; 644 if ($this->next_selector_at){675 if ($this->next_selector_at) { 645 676 $this->at = $this->css_new_media_section($this->next_selector_at); 646 677 $this->next_selector_at = ''; … … 648 679 } elseif ($string{$i} === '{') { 649 680 $this->status = 'ip'; 650 if ($this->at == '') {681 if ($this->at == '') { 651 682 $this->at = $this->css_new_media_section(DEFAULT_AT); 652 683 } … … 671 702 } else { 672 703 $lastpos = strlen($this->selector) - 1; 673 if ($lastpos == -1 || !( (ctype_space($this->selector{$lastpos}) || csstidy::is_token($this->selector, $lastpos) && $this->selector{$lastpos} === ',') && ctype_space($string{$i}))) {704 if ($lastpos == -1 || !( (ctype_space($this->selector{$lastpos}) || $this->is_token($this->selector, $lastpos) && $this->selector{$lastpos} === ',') && ctype_space($string{$i}))) { 674 705 $this->selector .= $string{$i}; 675 706 } … … 679 710 /* Case in-property */ 680 711 case 'ip': 681 if ( csstidy::is_token($string, $i)) {712 if ($this->is_token($string, $i)) { 682 713 if (($string{$i} === ':' || $string{$i} === '=') && $this->property != '') { 683 714 $this->status = 'iv'; 684 if (!$this->get_cfg('discard_invalid_properties') || csstidy::property_is_valid($this->property)) {715 if (!$this->get_cfg('discard_invalid_properties') || $this->property_is_valid($this->property)) { 685 716 $this->property = $this->css_new_property($this->at,$this->selector,$this->property); 686 717 $this->_add_token(PROPERTY, $this->property); … … 697 728 $this->selector = ''; 698 729 $this->property = ''; 699 if ($this->next_selector_at){730 if ($this->next_selector_at) { 700 731 $this->at = $this->css_new_media_section($this->next_selector_at); 701 732 $this->next_selector_at = ''; … … 708 739 // else this is dumb IE a hack, keep it 709 740 // including // 710 elseif (($this->property =='' AND!ctype_space($string{$i}))711 OR ($this->property=='/' OR $string{$i}=="/")) {741 elseif (($this->property === '' && !ctype_space($string{$i})) 742 || ($this->property === '/' || $string{$i} === '/')) { 712 743 $this->property .= $string{$i}; 713 744 } 714 } 715 elseif (!ctype_space($string{$i})) { 745 } elseif (!ctype_space($string{$i})) { 716 746 $this->property .= $string{$i}; 717 747 } … … 721 751 case 'iv': 722 752 $pn = (($string{$i} === "\n" || $string{$i} === "\r") && $this->property_is_next($string, $i + 1) || $i == strlen($string) - 1); 723 if ( csstidy::is_token($string, $i) || $pn) {753 if ($this->is_token($string, $i) || $pn) { 724 754 if ($string{$i} === '/' && @$string{$i + 1} === '*') { 725 755 $this->status = 'ic'; … … 763 793 } 764 794 if (($string{$i} === '}' || $string{$i} === ';' || $pn) && !empty($this->selector)) { 765 if ($this->at == ''){795 if ($this->at == '') { 766 796 $this->at = $this->css_new_media_section(DEFAULT_AT); 767 797 } … … 780 810 781 811 $this->value = ''; 782 while (count($this->sub_value_arr)){812 while (count($this->sub_value_arr)) { 783 813 $sub = array_shift($this->sub_value_arr); 784 if (strstr($this->selector, "font-face")){814 if (strstr($this->selector, 'font-face')) { 785 815 $sub = $this->quote_font_format($sub); 786 816 } 787 817 788 818 if ($sub != '') 789 $this->value .= ((!strlen($this->value) OR substr($this->value,-1,1)==',')?'':' ').$sub;819 $this->value .= ((!strlen($this->value) || substr($this->value,-1,1) === ',')?'':' ').$sub; 790 820 } 791 821 792 822 $this->optimise->value(); 793 823 794 $valid = csstidy::property_is_valid($this->property);824 $valid = $this->property_is_valid($this->property); 795 825 if ((!$this->invalid_at || $this->get_cfg('preserve_css')) && (!$this->get_cfg('discard_invalid_properties') || $valid)) { 796 826 $this->css_add_property($this->at, $this->selector, $this->property, $this->value); … … 816 846 $this->invalid_at = false; 817 847 $this->selector = ''; 818 if ($this->next_selector_at){848 if ($this->next_selector_at) { 819 849 $this->at = $this->css_new_media_section($this->next_selector_at); 820 850 $this->next_selector_at = ''; … … 841 871 $temp_add = $string{$i}; 842 872 843 // Add another string to the stack. Strings can't be nested inside of quotes, only parentheses, but 873 // Add another string to the stack. Strings can't be nested inside of quotes, only parentheses, but 844 874 // parentheticals can be nested more than once. 845 if ($_str_char === ")" && ($string{$i} === "(" || $string{$i} === '"' || $string{$i} === '\'') && ! csstidy::escaped($string, $i)) {875 if ($_str_char === ")" && ($string{$i} === "(" || $string{$i} === '"' || $string{$i} === '\'') && !$this->escaped($string, $i)) { 846 876 $this->cur_string[] = $string{$i}; 847 $this->str_char[] = $string{$i} == "(" ? ")": $string{$i};877 $this->str_char[] = $string{$i} === '(' ? ')' : $string{$i}; 848 878 $this->from[] = 'instr'; 849 $this->quoted_string[] = ($_str_char === ")" AND $string{$i} !== "(" AND trim($_cur_string)=="(")?$_quoted_string:!($string{$i} === "(");879 $this->quoted_string[] = ($_str_char === ')' && $string{$i} !== '(' && trim($_cur_string)==='(')?$_quoted_string:!($string{$i} === '('); 850 880 continue; 851 881 } 852 882 853 if ($_str_char !== ")" && ($string{$i} === "\n" || $string{$i} === "\r") && !($string{$i - 1} === '\\' && ! csstidy::escaped($string, $i - 1))) {883 if ($_str_char !== ")" && ($string{$i} === "\n" || $string{$i} === "\r") && !($string{$i - 1} === '\\' && !$this->escaped($string, $i - 1))) { 854 884 $temp_add = "\\A"; 855 885 $this->log('Fixed incorrect newline in string', 'Warning'); … … 858 888 $_cur_string .= $temp_add; 859 889 860 if ($string{$i} === $_str_char && ! csstidy::escaped($string, $i)) {890 if ($string{$i} === $_str_char && !$this->escaped($string, $i)) { 861 891 $this->status = array_pop($this->from); 862 892 863 if (!preg_match('|[' . implode('', $ GLOBALS['csstidy']['whitespace']) . ']|uis', $_cur_string) && $this->property !== 'content') {893 if (!preg_match('|[' . implode('', $this->data['csstidy']['whitespace']) . ']|uis', $_cur_string) && $this->property !== 'content') { 864 894 if (!$_quoted_string) { 865 895 if ($_str_char !== ')') { … … 883 913 array_pop($this->str_char); 884 914 885 if ($_str_char === ")") {886 $_cur_string = "(" . trim(substr($_cur_string, 1, -1)) . ")";915 if ($_str_char === ')') { 916 $_cur_string = '(' . trim(substr($_cur_string, 1, -1)) . ')'; 887 917 } 888 918 889 919 if ($this->status === 'iv') { 890 if (!$_quoted_string) {891 if (strpos($_cur_string,',') !==false)920 if (!$_quoted_string) { 921 if (strpos($_cur_string,',') !== false) 892 922 // we can on only remove space next to ',' 893 $_cur_string = implode(',', array_map('trim',explode(',',$_cur_string)));923 $_cur_string = implode(',', array_map('trim', explode(',',$_cur_string))); 894 924 // and multiple spaces (too expensive) 895 if (strpos($_cur_string, ' ')!==false)896 $_cur_string = preg_replace(",\s+,", " ",$_cur_string);925 if (strpos($_cur_string, ' ') !== false) 926 $_cur_string = preg_replace(",\s+,", ' ', $_cur_string); 897 927 } 898 928 $this->sub_value .= $_cur_string; … … 902 932 $this->cur_string[count($this->cur_string)-1] .= $_cur_string; 903 933 } 904 } 905 else { 934 } else { 906 935 $this->cur_string[count($this->cur_string)-1] = $_cur_string; 907 936 } … … 938 967 * @return string 939 968 */ 940 function quote_font_format($value){941 if (strncmp($value,'format',6) ==0) {942 $p = str rpos($value,")");969 public function quote_font_format($value) { 970 if (strncmp($value,'format',6) == 0) { 971 $p = strpos($value,')',7); 943 972 $end = substr($value,$p); 944 $format_strings = csstidy::parse_string_list(substr($value, 7, $p-7));973 $format_strings = $this->parse_string_list(substr($value, 7, $p-7)); 945 974 if (!$format_strings) { 946 $value = ""; 947 } 948 else { 949 $value = "format("; 975 $value = ''; 976 } else { 977 $value = 'format('; 950 978 951 979 foreach ($format_strings as $format_string) { … … 964 992 * @version 1.0 965 993 */ 966 function explode_selectors() {994 public function explode_selectors() { 967 995 // Explode multiple selectors 968 996 if ($this->get_cfg('merge_selectors') === 1) { … … 1012 1040 * @version 1.2 1013 1041 */ 1014 function css_add_property($media, $selector, $property, $new_val) {1042 public function css_add_property($media, $selector, $property, $new_val) { 1015 1043 if ($this->get_cfg('preserve_css') || trim($new_val) == '') { 1016 1044 return; … … 1019 1047 $this->added = true; 1020 1048 if (isset($this->css[$media][$selector][$property])) { 1021 if (( csstidy::is_important($this->css[$media][$selector][$property]) && csstidy::is_important($new_val)) || !csstidy::is_important($this->css[$media][$selector][$property])) {1049 if (($this->is_important($this->css[$media][$selector][$property]) && $this->is_important($new_val)) || !$this->is_important($this->css[$media][$selector][$property])) { 1022 1050 $this->css[$media][$selector][$property] = trim($new_val); 1023 1051 } … … 1036 1064 * @return string 1037 1065 */ 1038 function css_new_media_section($media){1039 if ($this->get_cfg('preserve_css')) {1066 public function css_new_media_section($media) { 1067 if ($this->get_cfg('preserve_css')) { 1040 1068 return $media; 1041 1069 } … … 1043 1071 // if the last @media is the same as this 1044 1072 // keep it 1045 if (!$this->css OR !is_array($this->css) OR empty($this->css)){1073 if (!$this->css || !is_array($this->css) || empty($this->css)) { 1046 1074 return $media; 1047 1075 } 1048 1076 end($this->css); 1049 1077 list($at,) = each($this->css); 1050 if ($at == $media) {1078 if ($at == $media) { 1051 1079 return $media; 1052 1080 } … … 1055 1083 $media++; 1056 1084 else 1057 $media .= " ";1085 $media .= ' '; 1058 1086 return $media; 1059 1087 } … … 1072 1100 * @return string 1073 1101 */ 1074 function css_new_selector($media,$selector){1075 if ($this->get_cfg('preserve_css')) {1102 public function css_new_selector($media,$selector) { 1103 if ($this->get_cfg('preserve_css')) { 1076 1104 return $selector; 1077 1105 } 1078 1106 $selector = trim($selector); 1079 if (strncmp($selector, "@font-face",10)!=0){1107 if (strncmp($selector,'@font-face',10)!=0) { 1080 1108 if ($this->settings['merge_selectors'] != false) 1081 1109 return $selector; 1082 1110 1083 if (!$this->css OR !isset($this->css[$media]) OR!$this->css[$media])1111 if (!$this->css || !isset($this->css[$media]) || !$this->css[$media]) 1084 1112 return $selector; 1085 1113 … … 1087 1115 end($this->css[$media]); 1088 1116 list($sel,) = each($this->css[$media]); 1089 if ($sel == $selector) {1117 if ($sel == $selector) { 1090 1118 return $selector; 1091 1119 } … … 1093 1121 1094 1122 while (isset($this->css[$media][$selector])) 1095 $selector .= " ";1123 $selector .= ' '; 1096 1124 return $selector; 1097 1125 } … … 1107 1135 * @return string 1108 1136 */ 1109 function css_new_property($media, $selector, $property){1110 if ($this->get_cfg('preserve_css')) {1137 public function css_new_property($media, $selector, $property) { 1138 if ($this->get_cfg('preserve_css')) { 1111 1139 return $property; 1112 1140 } 1113 if (!$this->css OR !isset($this->css[$media][$selector]) OR!$this->css[$media][$selector])1141 if (!$this->css || !isset($this->css[$media][$selector]) || !$this->css[$media][$selector]) 1114 1142 return $property; 1115 1143 1116 1144 while (isset($this->css[$media][$selector][$property])) 1117 $property .= " ";1145 $property .= ' '; 1118 1146 1119 1147 return $property; … … 1128 1156 * @version 1.1 1129 1157 */ 1130 function merge_css_blocks($media, $selector, $css_add) {1158 public function merge_css_blocks($media, $selector, $css_add) { 1131 1159 foreach ($css_add as $property => $value) { 1132 1160 $this->css_add_property($media, $selector, $property, $value, false); … … 1141 1169 * @version 1.0 1142 1170 */ 1143 static function is_important(&$value) {1171 public function is_important(&$value) { 1144 1172 return ( 1145 strpos($value, "!")!==false // quick test1146 AND !strcasecmp(substr(str_replace($GLOBALS['csstidy']['whitespace'], '', $value), -10, 10), '!important'));1173 strpos($value, '!') !== false // quick test 1174 AND !strcasecmp(substr(str_replace($this->data['csstidy']['whitespace'], '', $value), -10, 10), '!important')); 1147 1175 } 1148 1176 … … 1154 1182 * @version 1.0 1155 1183 */ 1156 static function gvw_important($value) {1157 if ( csstidy::is_important($value)) {1184 public function gvw_important($value) { 1185 if ($this->is_important($value)) { 1158 1186 $value = trim($value); 1159 1187 $value = substr($value, 0, -9); … … 1174 1202 * @version 1.2 1175 1203 */ 1176 function property_is_next($istring, $pos) {1177 $all_properties = & $ GLOBALS['csstidy']['all_properties'];1204 public function property_is_next($istring, $pos) { 1205 $all_properties = & $this->data['csstidy']['all_properties']; 1178 1206 $istring = substr($istring, $pos, strlen($istring) - $pos); 1179 1207 $pos = strpos($istring, ':'); … … 1196 1224 * @version 1.0 1197 1225 */ 1198 function property_is_valid($property) {1199 if (in_array(trim($property), $ GLOBALS['csstidy']['multiple_properties'])) $property = trim($property);1200 $all_properties = & $ GLOBALS['csstidy']['all_properties'];1226 public function property_is_valid($property) { 1227 if (in_array(trim($property), $this->data['csstidy']['multiple_properties'])) $property = trim($property); 1228 $all_properties = & $this->data['csstidy']['all_properties']; 1201 1229 return (isset($all_properties[$property]) && strpos($all_properties[$property], strtoupper($this->get_cfg('css_level'))) !== false ); 1202 1230 } … … 1217 1245 */ 1218 1246 1219 function parse_string_list($value) {1247 public function parse_string_list($value) { 1220 1248 $value = trim($value); 1221 1249 … … 1226 1254 1227 1255 $in_str = false; 1228 $current_string = "";1256 $current_string = ''; 1229 1257 1230 1258 for ($i = 0, $_len = strlen($value); $i < $_len; $i++) { 1231 if (($value{$i} == "," || $value{$i} === " ") && $in_str === true) {1259 if (($value{$i} === ',' || $value{$i} === ' ') && $in_str === true) { 1232 1260 $in_str = false; 1233 1261 $strings[] = $current_string; 1234 $current_string = ""; 1235 } 1236 else if ($value{$i} == '"' || $value{$i} == "'"){ 1262 $current_string = ''; 1263 } elseif ($value{$i} === '"' || $value{$i} === "'") { 1237 1264 if ($in_str === $value{$i}) { 1238 1265 $strings[] = $current_string; 1239 1266 $in_str = false; 1240 $current_string = "";1267 $current_string = ''; 1241 1268 continue; 1242 } 1243 else if (!$in_str) { 1269 } elseif (!$in_str) { 1244 1270 $in_str = $value{$i}; 1245 1271 } 1246 } 1247 else { 1248 if ($in_str){ 1272 } else { 1273 if ($in_str) { 1249 1274 $current_string .= $value{$i}; 1250 } 1251 else { 1275 } else { 1252 1276 if (!preg_match("/[\s,]/", $value{$i})) { 1253 1277 $in_str = true; -
_core_/branches/spip-3.0/plugins/compresseur/lib/csstidy/class.csstidy_optimise.php
r63080 r81332 20 20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 21 * GNU Lesser General Public License for more details. 22 * 22 * 23 23 * You should have received a copy of the GNU Lesser General Public License 24 24 * along with this program. If not, see <http://www.gnu.org/licenses/>. … … 44 44 45 45 /** 46 * csstidy object 47 * @var object 48 */ 49 public $parser; 50 51 /** 46 52 * Constructor 47 53 * @param array $css contains the class csstidy … … 49 55 * @version 1.0 50 56 */ 51 function csstidy_optimise(&$css) {52 $this->parser = &$css;57 public function __construct($css) { 58 $this->parser = $css; 53 59 $this->css = & $css->css; 54 60 $this->sub_value = & $css->sub_value; … … 64 70 * @version 1.0 65 71 */ 66 function postparse() {72 public function postparse() { 67 73 if ($this->parser->get_cfg('preserve_css')) { 68 74 return; … … 84 90 foreach ($this->css as $medium => $value) { 85 91 foreach ($value as $selector => $value1) { 86 $this->css[$medium][$selector] = csstidy_optimise::merge_4value_shorthands($this->css[$medium][$selector]);92 $this->css[$medium][$selector] = $this->merge_4value_shorthands($this->css[$medium][$selector]); 87 93 88 94 if ($this->parser->get_cfg('optimise_shorthands') < 2) { … … 90 96 } 91 97 92 $this->css[$medium][$selector] = csstidy_optimise::merge_font($this->css[$medium][$selector]);98 $this->css[$medium][$selector] = $this->merge_font($this->css[$medium][$selector]); 93 99 94 100 if ($this->parser->get_cfg('optimise_shorthands') < 3) { … … 96 102 } 97 103 98 $this->css[$medium][$selector] = csstidy_optimise::merge_bg($this->css[$medium][$selector]);104 $this->css[$medium][$selector] = $this->merge_bg($this->css[$medium][$selector]); 99 105 if (empty($this->css[$medium][$selector])) { 100 106 unset($this->css[$medium][$selector]); … … 110 116 * @version 1.0 111 117 */ 112 function value() {113 $shorthands = & $ GLOBALS['csstidy']['shorthands'];118 public function value() { 119 $shorthands = & $this->parser->data['csstidy']['shorthands']; 114 120 115 121 // optimise shorthand properties 116 122 if (isset($shorthands[$this->property])) { 117 $temp = csstidy_optimise::shorthand($this->value); // FIXME - move123 $temp = $this->shorthand($this->value); // FIXME - move 118 124 if ($temp != $this->value) { 119 125 $this->parser->log('Optimised shorthand notation (' . $this->property . '): Changed "' . $this->value . '" to "' . $temp . '"', 'Information'); … … 133 139 * @version 1.0 134 140 */ 135 function shorthands() {136 $shorthands = & $ GLOBALS['csstidy']['shorthands'];141 public function shorthands() { 142 $shorthands = & $this->parser->data['csstidy']['shorthands']; 137 143 138 144 if (!$this->parser->get_cfg('optimise_shorthands') || $this->parser->get_cfg('preserve_css')) { … … 142 148 if ($this->property === 'font' && $this->parser->get_cfg('optimise_shorthands') > 1) { 143 149 $this->css[$this->at][$this->selector]['font']=''; 144 $this->parser->merge_css_blocks($this->at, $this->selector, csstidy_optimise::dissolve_short_font($this->value));150 $this->parser->merge_css_blocks($this->at, $this->selector, $this->dissolve_short_font($this->value)); 145 151 } 146 152 if ($this->property === 'background' && $this->parser->get_cfg('optimise_shorthands') > 2) { 147 153 $this->css[$this->at][$this->selector]['background']=''; 148 $this->parser->merge_css_blocks($this->at, $this->selector, csstidy_optimise::dissolve_short_bg($this->value));154 $this->parser->merge_css_blocks($this->at, $this->selector, $this->dissolve_short_bg($this->value)); 149 155 } 150 156 if (isset($shorthands[$this->property])) { 151 $this->parser->merge_css_blocks($this->at, $this->selector, csstidy_optimise::dissolve_4value_shorthands($this->property, $this->value));157 $this->parser->merge_css_blocks($this->at, $this->selector, $this->dissolve_4value_shorthands($this->property, $this->value)); 152 158 if (is_array($shorthands[$this->property])) { 153 159 $this->css[$this->at][$this->selector][$this->property] = ''; … … 161 167 * @version 1.0 162 168 */ 163 function subvalue() {164 $replace_colors = & $ GLOBALS['csstidy']['replace_colors'];169 public function subvalue() { 170 $replace_colors = & $this->parser->data['csstidy']['replace_colors']; 165 171 166 172 $this->sub_value = trim($this->sub_value); … … 170 176 171 177 $important = ''; 172 if ( csstidy::is_important($this->sub_value)) {178 if ($this->parser->is_important($this->sub_value)) { 173 179 $important = '!important'; 174 180 } 175 $this->sub_value = csstidy::gvw_important($this->sub_value);181 $this->sub_value = $this->parser->gvw_important($this->sub_value); 176 182 177 183 // Compress font-weight … … 180 186 $this->sub_value = '700'; 181 187 $this->parser->log('Optimised font-weight: Changed "bold" to "700"', 'Information'); 182 } else 188 } elseif ($this->sub_value === 'normal') { 183 189 $this->sub_value = '400'; 184 190 $this->parser->log('Optimised font-weight: Changed "normal" to "400"', 'Information'); … … 216 222 * @version 1.0 217 223 */ 218 function shorthand($value) {224 public function shorthand($value) { 219 225 $important = ''; 220 if ( csstidy::is_important($value)) {221 $values = csstidy::gvw_important($value);226 if ($this->parser->is_important($value)) { 227 $values = $this->parser->gvw_important($value); 222 228 $important = '!important'; 223 229 } … … 262 268 * @version 1.1 263 269 */ 264 function compress_important(&$string) {265 if ( csstidy::is_important($string)) {266 $string = csstidy::gvw_important($string) . '!important';270 public function compress_important(&$string) { 271 if ($this->parser->is_important($string)) { 272 $string = $this->parser->gvw_important($string) . '!important'; 267 273 } 268 274 return $string; … … 275 281 * @version 1.1 276 282 */ 277 function cut_color($color) {278 $replace_colors = & $ GLOBALS['csstidy']['replace_colors'];283 public function cut_color($color) { 284 $replace_colors = & $this->parser->data['csstidy']['replace_colors']; 279 285 280 286 // if it's a string, don't touch ! 281 if (strncmp($color, "'",1)==0 OR strncmp($color,'"',1)==0)287 if (strncmp($color, "'", 1) == 0 || strncmp($color, '"', 1) == 0) 282 288 return $color; 283 289 284 290 /* expressions complexes de type gradient */ 285 if (strpos($color, "(")!==false AND strncmp($color,'rgb(',4)!=0){291 if (strpos($color, '(') !== false && strncmp($color, 'rgb(' ,4) != 0) { 286 292 // on ne touche pas aux couleurs dans les expression ms, c'est trop sensible 287 if (stripos($color, "progid:")!==false)293 if (stripos($color, 'progid:') !== false) 288 294 return $color; 289 preg_match_all(",rgb\([^)]+\),i", $color,$matches,PREG_SET_ORDER);290 if (count($matches)) {291 foreach ($matches as $m) {292 $color = str_replace($m[0], $this->cut_color($m[0]),$color);293 } 294 } 295 preg_match_all(",#[0-9a-f]{6}(?=[^0-9a-f]),i", $color,$matches,PREG_SET_ORDER);296 if (count($matches)) {297 foreach ($matches as $m) {298 $color = str_replace($m[0],$this->cut_color($m[0]), $color);295 preg_match_all(",rgb\([^)]+\),i", $color, $matches, PREG_SET_ORDER); 296 if (count($matches)) { 297 foreach ($matches as $m) { 298 $color = str_replace($m[0], $this->cut_color($m[0]), $color); 299 } 300 } 301 preg_match_all(",#[0-9a-f]{6}(?=[^0-9a-f]),i", $color, $matches, PREG_SET_ORDER); 302 if (count($matches)) { 303 foreach ($matches as $m) { 304 $color = str_replace($m[0],$this->cut_color($m[0]), $color); 299 305 } 300 306 } … … 366 372 * @version 1.2 367 373 */ 368 function compress_numbers($subvalue) {369 $unit_values = & $ GLOBALS['csstidy']['unit_values'];370 $color_values = & $ GLOBALS['csstidy']['color_values'];374 public function compress_numbers($subvalue) { 375 $unit_values = & $this->parser->data['csstidy']['unit_values']; 376 $color_values = & $this->parser->data['csstidy']['color_values']; 371 377 372 378 // for font:1em/1em sans-serif...; … … 376 382 $temp = array($subvalue); 377 383 } 384 378 385 for ($l = 0; $l < count($temp); $l++) { 379 386 // if we are not dealing with a number at this point, do not optimise anything … … 409 416 * @return array ('unit' if unit is found or '' if no unit exists, number value) or false if no number 410 417 */ 411 function AnalyseCssNumber($string) {418 public function AnalyseCssNumber($string) { 412 419 // most simple checks first 413 420 if (strlen($string) == 0 || ctype_alpha($string{0})) { … … 415 422 } 416 423 417 $units = & $ GLOBALS['csstidy']['units'];424 $units = & $this->parser->data['csstidy']['units']; 418 425 $return = array(0, ''); 419 426 … … 454 461 * @version 1.2 455 462 */ 456 function merge_selectors(&$array) {463 public function merge_selectors(&$array) { 457 464 $css = $array; 458 465 foreach ($css as $key => $value) { … … 495 502 * @version 1.4 496 503 */ 497 function discard_invalid_selectors(&$array) {504 public function discard_invalid_selectors(&$array) { 498 505 $invalid = array('+' => true, '~' => true, ',' => true, '>' => true); 499 506 foreach ($array as $selector => $decls) { … … 522 529 * @see merge_4value_shorthands() 523 530 */ 524 function dissolve_4value_shorthands($property, $value) {525 $shorthands = & $ GLOBALS['csstidy']['shorthands'];531 public function dissolve_4value_shorthands($property, $value) { 532 $shorthands = & $this->parser->data['csstidy']['shorthands']; 526 533 if (!is_array($shorthands[$property])) { 527 534 $return[$property] = $value; … … 530 537 531 538 $important = ''; 532 if ( csstidy::is_important($value)) {533 $value = csstidy::gvw_important($value);539 if ($this->parser->is_important($value)) { 540 $value = $this->parser->gvw_important($value); 534 541 $important = '!important'; 535 542 } … … 567 574 * @version 1.0 568 575 */ 569 function explode_ws($sep, $string) {576 public function explode_ws($sep, $string) { 570 577 $status = 'st'; 571 578 $to = ''; … … 576 583 switch ($status) { 577 584 case 'st': 578 if ($string{$i} == $sep && ! csstidy::escaped($string, $i)) {585 if ($string{$i} == $sep && !$this->parser->escaped($string, $i)) { 579 586 ++$num; 580 } elseif ($string{$i} === '"' || $string{$i} === '\'' || $string{$i} === '(' && ! csstidy::escaped($string, $i)) {587 } elseif ($string{$i} === '"' || $string{$i} === '\'' || $string{$i} === '(' && !$this->parser->escaped($string, $i)) { 581 588 $status = 'str'; 582 589 $to = ($string{$i} === '(') ? ')' : $string{$i}; … … 588 595 589 596 case 'str': 590 if ($string{$i} == $to && ! csstidy::escaped($string, $i)) {597 if ($string{$i} == $to && !$this->parser->escaped($string, $i)) { 591 598 $status = 'st'; 592 599 } … … 610 617 * @see dissolve_4value_shorthands() 611 618 */ 612 function merge_4value_shorthands($array) {619 public function merge_4value_shorthands($array) { 613 620 $return = $array; 614 $shorthands = & $ GLOBALS['csstidy']['shorthands'];621 $shorthands = & $this->parser->data['csstidy']['shorthands']; 615 622 616 623 foreach ($shorthands as $key => $value) { … … 622 629 for ($i = 0; $i < 4; $i++) { 623 630 $val = $array[$value[$i]]; 624 if ( csstidy::is_important($val)) {631 if ($this->parser->is_important($val)) { 625 632 $important = '!important'; 626 $return[$key] .= csstidy::gvw_important($val) . ' ';633 $return[$key] .= $this->parser->gvw_important($val) . ' '; 627 634 } else { 628 635 $return[$key] .= $val . ' '; … … 630 637 unset($return[$value[$i]]); 631 638 } 632 $return[$key] = csstidy_optimise::shorthand(trim($return[$key] . $important));639 $return[$key] = $this->shorthand(trim($return[$key] . $important)); 633 640 } 634 641 } … … 644 651 * @todo full CSS 3 compliance 645 652 */ 646 function dissolve_short_bg($str_value) {653 public function dissolve_short_bg($str_value) { 647 654 // don't try to explose background gradient ! 648 if (stripos($str_value, "gradient(")!==FALSE)655 if (stripos($str_value, 'gradient(')!== false) 649 656 return array('background'=>$str_value); 650 651 $background_prop_default = & $ GLOBALS['csstidy']['background_prop_default'];657 658 $background_prop_default = & $this->parser->data['csstidy']['background_prop_default']; 652 659 $repeat = array('repeat', 'repeat-x', 'repeat-y', 'no-repeat', 'space'); 653 660 $attachment = array('scroll', 'fixed', 'local'); … … 658 665 $return = array('background-image' => null, 'background-size' => null, 'background-repeat' => null, 'background-position' => null, 'background-attachment' => null, 'background-clip' => null, 'background-origin' => null, 'background-color' => null); 659 666 660 if ( csstidy::is_important($str_value)) {667 if ($this->parser->is_important($str_value)) { 661 668 $important = ' !important'; 662 $str_value = csstidy::gvw_important($str_value);663 } 664 665 $str_value = csstidy_optimise::explode_ws(',', $str_value);669 $str_value = $this->parser->gvw_important($str_value); 670 } 671 672 $str_value = $this->explode_ws(',', $str_value); 666 673 for ($i = 0; $i < count($str_value); $i++) { 667 674 $have['clip'] = false; … … 673 680 $str_value[$i] = $str_value[$i][0]; 674 681 } 675 $str_value[$i] = csstidy_optimise::explode_ws(' ', trim($str_value[$i]));682 $str_value[$i] = $this->explode_ws(' ', trim($str_value[$i])); 676 683 677 684 for ($j = 0; $j < count($str_value[$i]); $j++) { … … 696 703 $return['background-position'].= ','; 697 704 $have['pos'] = true; 698 } 699 elseif (!$have['color']) { 705 } elseif (!$have['color']) { 700 706 $return['background-color'] .= $str_value[$i][$j] . ','; 701 707 $have['color'] = true; … … 722 728 * @todo full CSS 3 compliance 723 729 */ 724 function merge_bg($input_css) {725 $background_prop_default = & $ GLOBALS['csstidy']['background_prop_default'];730 public function merge_bg($input_css) { 731 $background_prop_default = & $this->parser->data['csstidy']['background_prop_default']; 726 732 // Max number of background images. CSS3 not yet fully implemented 727 $number_of_values = @max(count( csstidy_optimise::explode_ws(',', $input_css['background-image'])), count(csstidy_optimise::explode_ws(',', $input_css['background-color'])), 1);733 $number_of_values = @max(count($this->explode_ws(',', $input_css['background-image'])), count($this->explode_ws(',', $input_css['background-color'])), 1); 728 734 // Array with background images to check if BG image exists 729 $bg_img_array = @ csstidy_optimise::explode_ws(',', csstidy::gvw_important($input_css['background-image']));735 $bg_img_array = @$this->explode_ws(',', $this->parser->gvw_important($input_css['background-image'])); 730 736 $new_bg_value = ''; 731 737 $important = ''; 732 738 733 739 // if background properties is here and not empty, don't try anything 734 if (isset($input_css['background']) AND$input_css['background'])740 if (isset($input_css['background']) && $input_css['background']) 735 741 return $input_css; 736 742 737 743 for ($i = 0; $i < $number_of_values; $i++) { 738 744 foreach ($background_prop_default as $bg_property => $default_value) { … … 744 750 $cur_value = $input_css[$bg_property]; 745 751 // skip all optimisation if gradient() somewhere 746 if (stripos($cur_value, "gradient(")!==FALSE)752 if (stripos($cur_value, 'gradient(') !== false) 747 753 return $input_css; 748 754 … … 755 761 756 762 // Remove !important 757 if ( csstidy::is_important($cur_value)) {763 if ($this->parser->is_important($cur_value)) { 758 764 $important = ' !important'; 759 $cur_value = csstidy::gvw_important($cur_value);765 $cur_value = $this->parser->gvw_important($cur_value); 760 766 } 761 767 … … 765 771 } 766 772 767 $temp = csstidy_optimise::explode_ws(',', $cur_value);773 $temp = $this->explode_ws(',', $cur_value); 768 774 769 775 if (isset($temp[$i])) { … … 802 808 * @see merge_font() 803 809 */ 804 function dissolve_short_font($str_value) {805 $font_prop_default = & $ GLOBALS['csstidy']['font_prop_default'];810 public function dissolve_short_font($str_value) { 811 $font_prop_default = & $this->parser->data['csstidy']['font_prop_default']; 806 812 $font_weight = array('normal', 'bold', 'bolder', 'lighter', 100, 200, 300, 400, 500, 600, 700, 800, 900); 807 813 $font_variant = array('normal', 'small-caps'); … … 810 816 $return = array('font-style' => null, 'font-variant' => null, 'font-weight' => null, 'font-size' => null, 'line-height' => null, 'font-family' => null); 811 817 812 if ( csstidy::is_important($str_value)) {818 if ($this->parser->is_important($str_value)) { 813 819 $important = '!important'; 814 $str_value = csstidy::gvw_important($str_value);820 $str_value = $this->parser->gvw_important($str_value); 815 821 } 816 822 … … 823 829 824 830 // Workaround with multiple font-family 825 $str_value = csstidy_optimise::explode_ws(',', trim($str_value));826 827 $str_value[0] = csstidy_optimise::explode_ws(' ', trim($str_value[0]));831 $str_value = $this->explode_ws(',', trim($str_value)); 832 833 $str_value[0] = $this->explode_ws(' ', trim($str_value[0])); 828 834 829 835 for ($j = 0; $j < count($str_value[0]); $j++) { … … 838 844 $have['style'] = true; 839 845 } elseif ($have['size'] === false && (is_numeric($str_value[0][$j]{0}) || $str_value[0][$j]{0} === null || $str_value[0][$j]{0} === '.')) { 840 $size = csstidy_optimise::explode_ws('/', trim($str_value[0][$j]));846 $size = $this->explode_ws('/', trim($str_value[0][$j])); 841 847 $return['font-size'] = $size[0]; 842 848 if (isset($size[1])) { … … 889 895 * @see dissolve_short_font() 890 896 */ 891 function merge_font($input_css) {892 $font_prop_default = & $ GLOBALS['csstidy']['font_prop_default'];897 public function merge_font($input_css) { 898 $font_prop_default = & $this->parser->data['csstidy']['font_prop_default']; 893 899 $new_font_value = ''; 894 900 $important = ''; … … 897 903 // fix several words in font-family - add quotes 898 904 if (isset($input_css['font-family'])) { 899 $families = explode( ",", $input_css['font-family']);905 $families = explode(',', $input_css['font-family']); 900 906 $result_families = array(); 901 907 foreach ($families as $family) { 902 908 $family = trim($family); 903 909 $len = strlen($family); 904 if (strpos($family, " ") &&905 !(($family{0} == '"' && $family{$len - 1}== '"') ||906 ($family{0} == "'" && $family{$len - 1}== "'"))) {910 if (strpos($family, ' ') && 911 !(($family{0} === '"' && $family{$len - 1} === '"') || 912 ($family{0} === "'" && $family{$len - 1} === "'"))) { 907 913 $family = '"' . $family . '"'; 908 914 } 909 915 $result_families[] = $family; 910 916 } 911 $input_css['font-family'] = implode( ",", $result_families);917 $input_css['font-family'] = implode(',', $result_families); 912 918 } 913 919 foreach ($font_prop_default as $font_property => $default_value) { … … 926 932 927 933 // Remove !important 928 if ( csstidy::is_important($cur_value)) {934 if ($this->parser->is_important($cur_value)) { 929 935 $important = '!important'; 930 $cur_value = csstidy::gvw_important($cur_value);936 $cur_value = $this->parser->gvw_important($cur_value); 931 937 } 932 938 … … 941 947 // Delete all font-properties 942 948 foreach ($font_prop_default as $font_property => $default_value) { 943 if ($font_property !=='font' OR!$new_font_value)949 if ($font_property !== 'font' || !$new_font_value) 944 950 unset($input_css[$font_property]); 945 951 } -
_core_/branches/spip-3.0/plugins/compresseur/lib/csstidy/class.csstidy_print.php
r63080 r81332 20 20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 21 * GNU Lesser General Public License for more details. 22 * 22 * 23 23 * You should have received a copy of the GNU Lesser General Public License 24 24 * along with this program. If not, see <http://www.gnu.org/licenses/>. … … 43 43 44 44 /** 45 * csstidy object 46 * @var object 47 */ 48 public $parser; 49 50 /** 45 51 * Saves the input CSS string 46 52 * @var string 47 53 * @access private 48 54 */ 49 var$input_css = '';55 public $input_css = ''; 50 56 /** 51 57 * Saves the formatted CSS string … … 53 59 * @access public 54 60 */ 55 var$output_css = '';61 public $output_css = ''; 56 62 /** 57 63 * Saves the formatted CSS string (plain text) … … 59 65 * @access public 60 66 */ 61 var$output_css_plain = '';67 public $output_css_plain = ''; 62 68 63 69 /** … … 67 73 * @version 1.0 68 74 */ 69 function csstidy_print(&$css) {70 $this->parser = &$css;75 public function __construct($css) { 76 $this->parser = $css; 71 77 $this->css = & $css->css; 72 78 $this->template = & $css->template; … … 82 88 * @version 1.0 83 89 */ 84 function _reset() {90 public function _reset() { 85 91 $this->output_css = ''; 86 92 $this->output_css_plain = ''; … … 94 100 * @version 1.0 95 101 */ 96 function plain($default_media='') {102 public function plain($default_media='') { 97 103 $this->_print(true, $default_media); 98 104 return $this->output_css_plain; … … 106 112 * @version 1.0 107 113 */ 108 function formatted($default_media='') {114 public function formatted($default_media='') { 109 115 $this->_print(false, $default_media); 110 116 return $this->output_css; … … 121 127 * @version 1.4 122 128 */ 123 function formatted_page($doctype='xhtml1.1', $externalcss=true, $title='', $lang='en') {129 public function formatted_page($doctype='html5', $externalcss=true, $title='', $lang='en') { 124 130 switch ($doctype) { 125 case 'xhtml1.0strict': 131 case 'html5': 132 $doctype_output = '<!DOCTYPE html>'; 133 break; 134 case 'xhtml1.0strict': 126 135 $doctype_output = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 127 136 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">'; … … 148 157 } else { 149 158 $output .= "\n" . ' <link rel="stylesheet" type="text/css" href="cssparsed.css" />'; 150 // }151 159 } 152 160 $output .= "\n</head>\n<body><code id=\"copytext\">"; … … 163 171 * @version 2.0 164 172 */ 165 function _print($plain = false, $default_media='') {173 public function _print($plain = false, $default_media='') { 166 174 if ($this->output_css && $this->output_css_plain) { 167 175 return; … … 279 287 * @version 1.0 280 288 */ 281 function _seeknocomment($key, $move) {289 public function _seeknocomment($key, $move) { 282 290 $go = ($move > 0) ? 1 : -1; 283 291 for ($i = $key + 1; abs($key - $i) - 1 < abs($move); $i += $go) { … … 299 307 * @version 1.0 300 308 */ 301 function _convert_raw_css($default_media='') {309 public function _convert_raw_css($default_media='') { 302 310 $this->tokens = array(); 303 311 $sort_selectors = $this->parser->get_cfg('sort_selectors'); … … 309 317 if (intval($medium) < DEFAULT_AT) { 310 318 // un medium vide (contenant @font-face ou autre @) ne produit aucun conteneur 311 if (strlen(trim($medium))) {319 if (strlen(trim($medium))) { 312 320 $this->parser->_add_token(AT_START, $medium, true); 313 321 } 314 } 315 elseif ($default_media) { 322 } elseif ($default_media) { 316 323 $this->parser->_add_token(AT_START, $default_media, true); 317 324 } 318 325 319 326 foreach ($val as $selector => $vali) { 320 327 if ($sort_properties) … … 329 336 ); 330 337 foreach ($vali as $property => $valj) { 331 if (strncmp($property,"//",2)!==0) {338 if (strncmp($property,"//",2)!==0) { 332 339 $matches = array(); 333 340 if ($sort_properties && preg_match('/^(\*|_|\/|-)(?!(ms|moz|o\b|xv|atsc|wap|khtml|webkit|ah|hp|ro|rim|tc)-)/', $property, $matches)) { … … 350 357 if (intval($medium) < DEFAULT_AT) { 351 358 // un medium vide (contenant @font-face ou autre @) ne produit aucun conteneur 352 if (strlen(trim($medium))) {359 if (strlen(trim($medium))) { 353 360 $this->parser->_add_token(AT_END, $medium, true); 354 361 } 355 } 356 elseif ($default_media) { 362 } elseif ($default_media) { 357 363 $this->parser->_add_token(AT_END, $default_media, true); 358 364 } … … 369 375 * @version 1.0 370 376 */ 371 function _htmlsp($string, $plain) {377 public function _htmlsp($string, $plain) { 372 378 if (!$plain) { 373 379 return htmlspecialchars($string, ENT_QUOTES, 'utf-8'); … … 382 388 * @version 1.2 383 389 */ 384 function get_ratio() {390 public function get_ratio() { 385 391 if (!$this->output_css_plain) { 386 392 $this->formatted(); … … 395 401 * @version 1.1 396 402 */ 397 function get_diff() {403 public function get_diff() { 398 404 if (!$this->output_css_plain) { 399 405 $this->formatted(); … … 418 424 * @version 1.0 419 425 */ 420 function size($loc = 'output') {426 public function size($loc = 'output') { 421 427 if ($loc === 'output' && !$this->output_css) { 422 428 $this->formatted(); -
_core_/branches/spip-3.0/plugins/compresseur/lib/csstidy/data.inc.php
r63080 r81332 1 1 <?php 2 3 2 /** 4 3 * Various CSS Data for CSSTidy … … 26 25 */ 27 26 28 define('AT_START', 1);29 define('AT_END', 2);30 define('SEL_START', 3);31 define('SEL_END', 4);32 define('PROPERTY', 5);33 define('VALUE', 6);34 define('COMMENT', 7);35 define('DEFAULT_AT', 41);36 37 27 /** 38 28 * All whitespace allowed in CSS 39 29 * 40 * @global array $ GLOBALS['csstidy']['whitespace']41 * @version 1.0 42 */ 43 $ GLOBALS['csstidy']['whitespace'] = array(' ',"\n","\t","\r","\x0B");30 * @global array $data['csstidy']['whitespace'] 31 * @version 1.0 32 */ 33 $data['csstidy']['whitespace'] = array(' ',"\n","\t","\r","\x0B"); 44 34 45 35 /** 46 36 * All CSS tokens used by csstidy 47 37 * 48 * @global string $ GLOBALS['csstidy']['tokens']49 * @version 1.0 50 */ 51 $ GLOBALS['csstidy']['tokens'] = '/@}{;:=\'"(,\\!$%&)*+.<>?[]^`|~';38 * @global string $data['csstidy']['tokens'] 39 * @version 1.0 40 */ 41 $data['csstidy']['tokens'] = '/@}{;:=\'"(,\\!$%&)*+.<>?[]^`|~'; 52 42 53 43 /** … … 55 45 * 56 46 * @see compress_numbers() 57 * @global array $ GLOBALS['csstidy']['units']58 * @version 1.0 59 */ 60 $ GLOBALS['csstidy']['units'] = array('in','cm','mm','pt','pc','px','rem','em','%','ex','gd','vw','vh','vm','deg','grad','rad','ms','s','khz','hz');47 * @global array $data['csstidy']['units'] 48 * @version 1.0 49 */ 50 $data['csstidy']['units'] = array('in','cm','mm','pt','pc','px','rem','em','%','ex','gd','vw','vh','vm','deg','grad','rad','turn','ms','s','khz','hz','ch','vmin','vmax','dpi','dpcm','dppx'); 61 51 62 52 /** 63 53 * Available at-rules 64 54 * 65 * @global array $ GLOBALS['csstidy']['at_rules']55 * @global array $data['csstidy']['at_rules'] 66 56 * @version 1.1 67 57 */ 68 $ GLOBALS['csstidy']['at_rules'] = array('page' => 'is','font-face' => 'atis','charset' => 'iv', 'import' => 'iv','namespace' => 'iv','media' => 'at','keyframes' => 'at');58 $data['csstidy']['at_rules'] = array('page' => 'is','font-face' => 'atis','charset' => 'iv', 'import' => 'iv','namespace' => 'iv','media' => 'at','keyframes' => 'at','-moz-keyframes' => 'at','-o-keyframes' => 'at','-webkit-keyframes' => 'at','-ms-keyframes' => 'at'); 69 59 70 60 /** … … 73 63 * @todo CSS3 properties 74 64 * @see compress_numbers(); 75 * @global array $ GLOBALS['csstidy']['unit_values']65 * @global array $data['csstidy']['unit_values'] 76 66 * @version 1.2 77 67 */ 78 $ GLOBALS['csstidy']['unit_values'] = array ('background', 'background-position', 'background-size', 'border', 'border-top', 'border-right', 'border-bottom', 'border-left', 'border-width',79 68 $data['csstidy']['unit_values'] = array ('background', 'background-position', 'background-size', 'border', 'border-top', 'border-right', 'border-bottom', 'border-left', 'border-width', 69 'border-top-width', 'border-right-width', 'border-left-width', 'border-bottom-width', 'bottom', 'border-spacing', 'column-gap', 'column-width', 80 70 'font-size', 'height', 'left', 'margin', 'margin-top', 'margin-right', 'margin-bottom', 'margin-left', 'max-height', 81 'max-width', 'min-height', 'min-width', 'outline', 'outline-width', 'padding', 'padding-top', 'padding-right', 71 'max-width', 'min-height', 'min-width', 'outline', 'outline-width', 'padding', 'padding-top', 'padding-right', 82 72 'padding-bottom', 'padding-left', 'perspective', 'right', 'top', 'text-indent', 'letter-spacing', 'word-spacing', 'width'); 83 73 … … 87 77 * @todo CSS3 properties 88 78 * @see compress_numbers(); 89 * @global array $ GLOBALS['csstidy']['color_values']90 * @version 1.0 91 */ 92 $ GLOBALS['csstidy']['color_values'] = array();93 $ GLOBALS['csstidy']['color_values'][] = 'background-color';94 $ GLOBALS['csstidy']['color_values'][] = 'border-color';95 $ GLOBALS['csstidy']['color_values'][] = 'border-top-color';96 $ GLOBALS['csstidy']['color_values'][] = 'border-right-color';97 $ GLOBALS['csstidy']['color_values'][] = 'border-bottom-color';98 $ GLOBALS['csstidy']['color_values'][] = 'border-left-color';99 $ GLOBALS['csstidy']['color_values'][] = 'color';100 $ GLOBALS['csstidy']['color_values'][] = 'outline-color';101 $ GLOBALS['csstidy']['color_values'][] = 'column-rule-color';79 * @global array $data['csstidy']['color_values'] 80 * @version 1.0 81 */ 82 $data['csstidy']['color_values'] = array(); 83 $data['csstidy']['color_values'][] = 'background-color'; 84 $data['csstidy']['color_values'][] = 'border-color'; 85 $data['csstidy']['color_values'][] = 'border-top-color'; 86 $data['csstidy']['color_values'][] = 'border-right-color'; 87 $data['csstidy']['color_values'][] = 'border-bottom-color'; 88 $data['csstidy']['color_values'][] = 'border-left-color'; 89 $data['csstidy']['color_values'][] = 'color'; 90 $data['csstidy']['color_values'][] = 'outline-color'; 91 $data['csstidy']['color_values'][] = 'column-rule-color'; 102 92 103 93 /** … … 105 95 * 106 96 * @todo Possibly property names will change during CSS3 development 107 * @global array $ GLOBALS['csstidy']['background_prop_default']97 * @global array $data['csstidy']['background_prop_default'] 108 98 * @see dissolve_short_bg() 109 99 * @see merge_bg() 110 100 * @version 1.0 111 101 */ 112 $ GLOBALS['csstidy']['background_prop_default'] = array();113 $ GLOBALS['csstidy']['background_prop_default']['background-image'] = 'none';114 $ GLOBALS['csstidy']['background_prop_default']['background-size'] = 'auto';115 $ GLOBALS['csstidy']['background_prop_default']['background-repeat'] = 'repeat';116 $ GLOBALS['csstidy']['background_prop_default']['background-position'] = '0 0';117 $ GLOBALS['csstidy']['background_prop_default']['background-attachment'] = 'scroll';118 $ GLOBALS['csstidy']['background_prop_default']['background-clip'] = 'border';119 $ GLOBALS['csstidy']['background_prop_default']['background-origin'] = 'padding';120 $ GLOBALS['csstidy']['background_prop_default']['background-color'] = 'transparent';102 $data['csstidy']['background_prop_default'] = array(); 103 $data['csstidy']['background_prop_default']['background-image'] = 'none'; 104 $data['csstidy']['background_prop_default']['background-size'] = 'auto'; 105 $data['csstidy']['background_prop_default']['background-repeat'] = 'repeat'; 106 $data['csstidy']['background_prop_default']['background-position'] = '0 0'; 107 $data['csstidy']['background_prop_default']['background-attachment'] = 'scroll'; 108 $data['csstidy']['background_prop_default']['background-clip'] = 'border'; 109 $data['csstidy']['background_prop_default']['background-origin'] = 'padding'; 110 $data['csstidy']['background_prop_default']['background-color'] = 'transparent'; 121 111 122 112 /** 123 113 * Default values for the font properties 124 114 * 125 * @global array $ GLOBALS['csstidy']['font_prop_default']115 * @global array $data['csstidy']['font_prop_default'] 126 116 * @see merge_fonts() 127 117 * @version 1.3 128 118 */ 129 $ GLOBALS['csstidy']['font_prop_default'] = array();130 $ GLOBALS['csstidy']['font_prop_default']['font-style'] = 'normal';131 $ GLOBALS['csstidy']['font_prop_default']['font-variant'] = 'normal';132 $ GLOBALS['csstidy']['font_prop_default']['font-weight'] = 'normal';133 $ GLOBALS['csstidy']['font_prop_default']['font-size'] = '';134 $ GLOBALS['csstidy']['font_prop_default']['line-height'] = '';135 $ GLOBALS['csstidy']['font_prop_default']['font-family'] = '';119 $data['csstidy']['font_prop_default'] = array(); 120 $data['csstidy']['font_prop_default']['font-style'] = 'normal'; 121 $data['csstidy']['font_prop_default']['font-variant'] = 'normal'; 122 $data['csstidy']['font_prop_default']['font-weight'] = 'normal'; 123 $data['csstidy']['font_prop_default']['font-size'] = ''; 124 $data['csstidy']['font_prop_default']['line-height'] = ''; 125 $data['csstidy']['font_prop_default']['font-family'] = ''; 136 126 137 127 /** 138 128 * A list of non-W3C color names which get replaced by their hex-codes 139 129 * 140 * @global array $ GLOBALS['csstidy']['replace_colors']130 * @global array $data['csstidy']['replace_colors'] 141 131 * @see cut_color() 142 132 * @version 1.0 143 133 */ 144 $ GLOBALS['csstidy']['replace_colors'] = array();145 $ GLOBALS['csstidy']['replace_colors']['aliceblue'] = '#f0f8ff';146 $ GLOBALS['csstidy']['replace_colors']['antiquewhite'] = '#faebd7';147 $ GLOBALS['csstidy']['replace_colors']['aquamarine'] = '#7fffd4';148 $ GLOBALS['csstidy']['replace_colors']['azure'] = '#f0ffff';149 $ GLOBALS['csstidy']['replace_colors']['beige'] = '#f5f5dc';150 $ GLOBALS['csstidy']['replace_colors']['bisque'] = '#ffe4c4';151 $ GLOBALS['csstidy']['replace_colors']['blanchedalmond'] = '#ffebcd';152 $ GLOBALS['csstidy']['replace_colors']['blueviolet'] = '#8a2be2';153 $ GLOBALS['csstidy']['replace_colors']['brown'] = '#a52a2a';154 $ GLOBALS['csstidy']['replace_colors']['burlywood'] = '#deb887';155 $ GLOBALS['csstidy']['replace_colors']['cadetblue'] = '#5f9ea0';156 $ GLOBALS['csstidy']['replace_colors']['chartreuse'] = '#7fff00';157 $ GLOBALS['csstidy']['replace_colors']['chocolate'] = '#d2691e';158 $ GLOBALS['csstidy']['replace_colors']['coral'] = '#ff7f50';159 $ GLOBALS['csstidy']['replace_colors']['cornflowerblue'] = '#6495ed';160 $ GLOBALS['csstidy']['replace_colors']['cornsilk'] = '#fff8dc';161 $ GLOBALS['csstidy']['replace_colors']['crimson'] = '#dc143c';162 $ GLOBALS['csstidy']['replace_colors']['cyan'] = '#00ffff';163 $ GLOBALS['csstidy']['replace_colors']['darkblue'] = '#00008b';164 $ GLOBALS['csstidy']['replace_colors']['darkcyan'] = '#008b8b';165 $ GLOBALS['csstidy']['replace_colors']['darkgoldenrod'] = '#b8860b';166 $ GLOBALS['csstidy']['replace_colors']['darkgray'] = '#a9a9a9';167 $ GLOBALS['csstidy']['replace_colors']['darkgreen'] = '#006400';168 $ GLOBALS['csstidy']['replace_colors']['darkkhaki'] = '#bdb76b';169 $ GLOBALS['csstidy']['replace_colors']['darkmagenta'] = '#8b008b';170 $ GLOBALS['csstidy']['replace_colors']['darkolivegreen'] = '#556b2f';171 $ GLOBALS['csstidy']['replace_colors']['darkorange'] = '#ff8c00';172 $ GLOBALS['csstidy']['replace_colors']['darkorchid'] = '#9932cc';173 $ GLOBALS['csstidy']['replace_colors']['darkred'] = '#8b0000';174 $ GLOBALS['csstidy']['replace_colors']['darksalmon'] = '#e9967a';175 $ GLOBALS['csstidy']['replace_colors']['darkseagreen'] = '#8fbc8f';176 $ GLOBALS['csstidy']['replace_colors']['darkslateblue'] = '#483d8b';177 $ GLOBALS['csstidy']['replace_colors']['darkslategray'] = '#2f4f4f';178 $ GLOBALS['csstidy']['replace_colors']['darkturquoise'] = '#00ced1';179 $ GLOBALS['csstidy']['replace_colors']['darkviolet'] = '#9400d3';180 $ GLOBALS['csstidy']['replace_colors']['deeppink'] = '#ff1493';181 $ GLOBALS['csstidy']['replace_colors']['deepskyblue'] = '#00bfff';182 $ GLOBALS['csstidy']['replace_colors']['dimgray'] = '#696969';183 $ GLOBALS['csstidy']['replace_colors']['dodgerblue'] = '#1e90ff';184 $ GLOBALS['csstidy']['replace_colors']['feldspar'] = '#d19275';185 $ GLOBALS['csstidy']['replace_colors']['firebrick'] = '#b22222';186 $ GLOBALS['csstidy']['replace_colors']['floralwhite'] = '#fffaf0';187 $ GLOBALS['csstidy']['replace_colors']['forestgreen'] = '#228b22';188 $ GLOBALS['csstidy']['replace_colors']['gainsboro'] = '#dcdcdc';189 $ GLOBALS['csstidy']['replace_colors']['ghostwhite'] = '#f8f8ff';190 $ GLOBALS['csstidy']['replace_colors']['gold'] = '#ffd700';191 $ GLOBALS['csstidy']['replace_colors']['goldenrod'] = '#daa520';192 $ GLOBALS['csstidy']['replace_colors']['greenyellow'] = '#adff2f';193 $ GLOBALS['csstidy']['replace_colors']['honeydew'] = '#f0fff0';194 $ GLOBALS['csstidy']['replace_colors']['hotpink'] = '#ff69b4';195 $ GLOBALS['csstidy']['replace_colors']['indianred'] = '#cd5c5c';196 $ GLOBALS['csstidy']['replace_colors']['indigo'] = '#4b0082';197 $ GLOBALS['csstidy']['replace_colors']['ivory'] = '#fffff0';198 $ GLOBALS['csstidy']['replace_colors']['khaki'] = '#f0e68c';199 $ GLOBALS['csstidy']['replace_colors']['lavender'] = '#e6e6fa';200 $ GLOBALS['csstidy']['replace_colors']['lavenderblush'] = '#fff0f5';201 $ GLOBALS['csstidy']['replace_colors']['lawngreen'] = '#7cfc00';202 $ GLOBALS['csstidy']['replace_colors']['lemonchiffon'] = '#fffacd';203 $ GLOBALS['csstidy']['replace_colors']['lightblue'] = '#add8e6';204 $ GLOBALS['csstidy']['replace_colors']['lightcoral'] = '#f08080';205 $ GLOBALS['csstidy']['replace_colors']['lightcyan'] = '#e0ffff';206 $ GLOBALS['csstidy']['replace_colors']['lightgoldenrodyellow'] = '#fafad2';207 $ GLOBALS['csstidy']['replace_colors']['lightgrey'] = '#d3d3d3';208 $ GLOBALS['csstidy']['replace_colors']['lightgreen'] = '#90ee90';209 $ GLOBALS['csstidy']['replace_colors']['lightpink'] = '#ffb6c1';210 $ GLOBALS['csstidy']['replace_colors']['lightsalmon'] = '#ffa07a';211 $ GLOBALS['csstidy']['replace_colors']['lightseagreen'] = '#20b2aa';212 $ GLOBALS['csstidy']['replace_colors']['lightskyblue'] = '#87cefa';213 $ GLOBALS['csstidy']['replace_colors']['lightslateblue'] = '#8470ff';214 $ GLOBALS['csstidy']['replace_colors']['lightslategray'] = '#778899';215 $ GLOBALS['csstidy']['replace_colors']['lightsteelblue'] = '#b0c4de';216 $ GLOBALS['csstidy']['replace_colors']['lightyellow'] = '#ffffe0';217 $ GLOBALS['csstidy']['replace_colors']['limegreen'] = '#32cd32';218 $ GLOBALS['csstidy']['replace_colors']['linen'] = '#faf0e6';219 $ GLOBALS['csstidy']['replace_colors']['magenta'] = '#ff00ff';220 $ GLOBALS['csstidy']['replace_colors']['mediumaquamarine'] = '#66cdaa';221 $ GLOBALS['csstidy']['replace_colors']['mediumblue'] = '#0000cd';222 $ GLOBALS['csstidy']['replace_colors']['mediumorchid'] = '#ba55d3';223 $ GLOBALS['csstidy']['replace_colors']['mediumpurple'] = '#9370d8';224 $ GLOBALS['csstidy']['replace_colors']['mediumseagreen'] = '#3cb371';225 $ GLOBALS['csstidy']['replace_colors']['mediumslateblue'] = '#7b68ee';226 $ GLOBALS['csstidy']['replace_colors']['mediumspringgreen'] = '#00fa9a';227 $ GLOBALS['csstidy']['replace_colors']['mediumturquoise'] = '#48d1cc';228 $ GLOBALS['csstidy']['replace_colors']['mediumvioletred'] = '#c71585';229 $ GLOBALS['csstidy']['replace_colors']['midnightblue'] = '#191970';230 $ GLOBALS['csstidy']['replace_colors']['mintcream'] = '#f5fffa';231 $ GLOBALS['csstidy']['replace_colors']['mistyrose'] = '#ffe4e1';232 $ GLOBALS['csstidy']['replace_colors']['moccasin'] = '#ffe4b5';233 $ GLOBALS['csstidy']['replace_colors']['navajowhite'] = '#ffdead';234 $ GLOBALS['csstidy']['replace_colors']['oldlace'] = '#fdf5e6';235 $ GLOBALS['csstidy']['replace_colors']['olivedrab'] = '#6b8e23';236 $ GLOBALS['csstidy']['replace_colors']['orangered'] = '#ff4500';237 $ GLOBALS['csstidy']['replace_colors']['orchid'] = '#da70d6';238 $ GLOBALS['csstidy']['replace_colors']['palegoldenrod'] = '#eee8aa';239 $ GLOBALS['csstidy']['replace_colors']['palegreen'] = '#98fb98';240 $ GLOBALS['csstidy']['replace_colors']['paleturquoise'] = '#afeeee';241 $ GLOBALS['csstidy']['replace_colors']['palevioletred'] = '#d87093';242 $ GLOBALS['csstidy']['replace_colors']['papayawhip'] = '#ffefd5';243 $ GLOBALS['csstidy']['replace_colors']['peachpuff'] = '#ffdab9';244 $ GLOBALS['csstidy']['replace_colors']['peru'] = '#cd853f';245 $ GLOBALS['csstidy']['replace_colors']['pink'] = '#ffc0cb';246 $ GLOBALS['csstidy']['replace_colors']['plum'] = '#dda0dd';247 $ GLOBALS['csstidy']['replace_colors']['powderblue'] = '#b0e0e6';248 $ GLOBALS['csstidy']['replace_colors']['rosybrown'] = '#bc8f8f';249 $ GLOBALS['csstidy']['replace_colors']['royalblue'] = '#4169e1';250 $ GLOBALS['csstidy']['replace_colors']['saddlebrown'] = '#8b4513';251 $ GLOBALS['csstidy']['replace_colors']['salmon'] = '#fa8072';252 $ GLOBALS['csstidy']['replace_colors']['sandybrown'] = '#f4a460';253 $ GLOBALS['csstidy']['replace_colors']['seagreen'] = '#2e8b57';254 $ GLOBALS['csstidy']['replace_colors']['seashell'] = '#fff5ee';255 $ GLOBALS['csstidy']['replace_colors']['sienna'] = '#a0522d';256 $ GLOBALS['csstidy']['replace_colors']['skyblue'] = '#87ceeb';257 $ GLOBALS['csstidy']['replace_colors']['slateblue'] = '#6a5acd';258 $ GLOBALS['csstidy']['replace_colors']['slategray'] = '#708090';259 $ GLOBALS['csstidy']['replace_colors']['snow'] = '#fffafa';260 $ GLOBALS['csstidy']['replace_colors']['springgreen'] = '#00ff7f';261 $ GLOBALS['csstidy']['replace_colors']['steelblue'] = '#4682b4';262 $ GLOBALS['csstidy']['replace_colors']['tan'] = '#d2b48c';263 $ GLOBALS['csstidy']['replace_colors']['thistle'] = '#d8bfd8';264 $ GLOBALS['csstidy']['replace_colors']['tomato'] = '#ff6347';265 $ GLOBALS['csstidy']['replace_colors']['turquoise'] = '#40e0d0';266 $ GLOBALS['csstidy']['replace_colors']['violet'] = '#ee82ee';267 $ GLOBALS['csstidy']['replace_colors']['violetred'] = '#d02090';268 $ GLOBALS['csstidy']['replace_colors']['wheat'] = '#f5deb3';269 $ GLOBALS['csstidy']['replace_colors']['whitesmoke'] = '#f5f5f5';270 $ GLOBALS['csstidy']['replace_colors']['yellowgreen'] = '#9acd32';134 $data['csstidy']['replace_colors'] = array(); 135 $data['csstidy']['replace_colors']['aliceblue'] = '#f0f8ff'; 136 $data['csstidy']['replace_colors']['antiquewhite'] = '#faebd7'; 137 $data['csstidy']['replace_colors']['aquamarine'] = '#7fffd4'; 138 $data['csstidy']['replace_colors']['azure'] = '#f0ffff'; 139 $data['csstidy']['replace_colors']['beige'] = '#f5f5dc'; 140 $data['csstidy']['replace_colors']['bisque'] = '#ffe4c4'; 141 $data['csstidy']['replace_colors']['blanchedalmond'] = '#ffebcd'; 142 $data['csstidy']['replace_colors']['blueviolet'] = '#8a2be2'; 143 $data['csstidy']['replace_colors']['brown'] = '#a52a2a'; 144 $data['csstidy']['replace_colors']['burlywood'] = '#deb887'; 145 $data['csstidy']['replace_colors']['cadetblue'] = '#5f9ea0'; 146 $data['csstidy']['replace_colors']['chartreuse'] = '#7fff00'; 147 $data['csstidy']['replace_colors']['chocolate'] = '#d2691e'; 148 $data['csstidy']['replace_colors']['coral'] = '#ff7f50'; 149 $data['csstidy']['replace_colors']['cornflowerblue'] = '#6495ed'; 150 $data['csstidy']['replace_colors']['cornsilk'] = '#fff8dc'; 151 $data['csstidy']['replace_colors']['crimson'] = '#dc143c'; 152 $data['csstidy']['replace_colors']['cyan'] = '#00ffff'; 153 $data['csstidy']['replace_colors']['darkblue'] = '#00008b'; 154 $data['csstidy']['replace_colors']['darkcyan'] = '#008b8b'; 155 $data['csstidy']['replace_colors']['darkgoldenrod'] = '#b8860b'; 156 $data['csstidy']['replace_colors']['darkgray'] = '#a9a9a9'; 157 $data['csstidy']['replace_colors']['darkgreen'] = '#006400'; 158 $data['csstidy']['replace_colors']['darkkhaki'] = '#bdb76b'; 159 $data['csstidy']['replace_colors']['darkmagenta'] = '#8b008b'; 160 $data['csstidy']['replace_colors']['darkolivegreen'] = '#556b2f'; 161 $data['csstidy']['replace_colors']['darkorange'] = '#ff8c00'; 162 $data['csstidy']['replace_colors']['darkorchid'] = '#9932cc'; 163 $data['csstidy']['replace_colors']['darkred'] = '#8b0000'; 164 $data['csstidy']['replace_colors']['darksalmon'] = '#e9967a'; 165 $data['csstidy']['replace_colors']['darkseagreen'] = '#8fbc8f'; 166 $data['csstidy']['replace_colors']['darkslateblue'] = '#483d8b'; 167 $data['csstidy']['replace_colors']['darkslategray'] = '#2f4f4f'; 168 $data['csstidy']['replace_colors']['darkturquoise'] = '#00ced1'; 169 $data['csstidy']['replace_colors']['darkviolet'] = '#9400d3'; 170 $data['csstidy']['replace_colors']['deeppink'] = '#ff1493'; 171 $data['csstidy']['replace_colors']['deepskyblue'] = '#00bfff'; 172 $data['csstidy']['replace_colors']['dimgray'] = '#696969'; 173 $data['csstidy']['replace_colors']['dodgerblue'] = '#1e90ff'; 174 $data['csstidy']['replace_colors']['feldspar'] = '#d19275'; 175 $data['csstidy']['replace_colors']['firebrick'] = '#b22222'; 176 $data['csstidy']['replace_colors']['floralwhite'] = '#fffaf0'; 177 $data['csstidy']['replace_colors']['forestgreen'] = '#228b22'; 178 $data['csstidy']['replace_colors']['gainsboro'] = '#dcdcdc'; 179 $data['csstidy']['replace_colors']['ghostwhite'] = '#f8f8ff'; 180 $data['csstidy']['replace_colors']['gold'] = '#ffd700'; 181 $data['csstidy']['replace_colors']['goldenrod'] = '#daa520'; 182 $data['csstidy']['replace_colors']['greenyellow'] = '#adff2f'; 183 $data['csstidy']['replace_colors']['honeydew'] = '#f0fff0'; 184 $data['csstidy']['replace_colors']['hotpink'] = '#ff69b4'; 185 $data['csstidy']['replace_colors']['indianred'] = '#cd5c5c'; 186 $data['csstidy']['replace_colors']['indigo'] = '#4b0082'; 187 $data['csstidy']['replace_colors']['ivory'] = '#fffff0'; 188 $data['csstidy']['replace_colors']['khaki'] = '#f0e68c'; 189 $data['csstidy']['replace_colors']['lavender'] = '#e6e6fa'; 190 $data['csstidy']['replace_colors']['lavenderblush'] = '#fff0f5'; 191 $data['csstidy']['replace_colors']['lawngreen'] = '#7cfc00'; 192 $data['csstidy']['replace_colors']['lemonchiffon'] = '#fffacd'; 193 $data['csstidy']['replace_colors']['lightblue'] = '#add8e6'; 194 $data['csstidy']['replace_colors']['lightcoral'] = '#f08080'; 195 $data['csstidy']['replace_colors']['lightcyan'] = '#e0ffff'; 196 $data['csstidy']['replace_colors']['lightgoldenrodyellow'] = '#fafad2'; 197 $data['csstidy']['replace_colors']['lightgrey'] = '#d3d3d3'; 198 $data['csstidy']['replace_colors']['lightgreen'] = '#90ee90'; 199 $data['csstidy']['replace_colors']['lightpink'] = '#ffb6c1'; 200 $data['csstidy']['replace_colors']['lightsalmon'] = '#ffa07a'; 201 $data['csstidy']['replace_colors']['lightseagreen'] = '#20b2aa'; 202 $data['csstidy']['replace_colors']['lightskyblue'] = '#87cefa'; 203 $data['csstidy']['replace_colors']['lightslateblue'] = '#8470ff'; 204 $data['csstidy']['replace_colors']['lightslategray'] = '#778899'; 205 $data['csstidy']['replace_colors']['lightsteelblue'] = '#b0c4de'; 206 $data['csstidy']['replace_colors']['lightyellow'] = '#ffffe0'; 207 $data['csstidy']['replace_colors']['limegreen'] = '#32cd32'; 208 $data['csstidy']['replace_colors']['linen'] = '#faf0e6'; 209 $data['csstidy']['replace_colors']['magenta'] = '#ff00ff'; 210 $data['csstidy']['replace_colors']['mediumaquamarine'] = '#66cdaa'; 211 $data['csstidy']['replace_colors']['mediumblue'] = '#0000cd'; 212 $data['csstidy']['replace_colors']['mediumorchid'] = '#ba55d3'; 213 $data['csstidy']['replace_colors']['mediumpurple'] = '#9370d8'; 214 $data['csstidy']['replace_colors']['mediumseagreen'] = '#3cb371'; 215 $data['csstidy']['replace_colors']['mediumslateblue'] = '#7b68ee'; 216 $data['csstidy']['replace_colors']['mediumspringgreen'] = '#00fa9a'; 217 $data['csstidy']['replace_colors']['mediumturquoise'] = '#48d1cc'; 218 $data['csstidy']['replace_colors']['mediumvioletred'] = '#c71585'; 219 $data['csstidy']['replace_colors']['midnightblue'] = '#191970'; 220 $data['csstidy']['replace_colors']['mintcream'] = '#f5fffa'; 221 $data['csstidy']['replace_colors']['mistyrose'] = '#ffe4e1'; 222 $data['csstidy']['replace_colors']['moccasin'] = '#ffe4b5'; 223 $data['csstidy']['replace_colors']['navajowhite'] = '#ffdead'; 224 $data['csstidy']['replace_colors']['oldlace'] = '#fdf5e6'; 225 $data['csstidy']['replace_colors']['olivedrab'] = '#6b8e23'; 226 $data['csstidy']['replace_colors']['orangered'] = '#ff4500'; 227 $data['csstidy']['replace_colors']['orchid'] = '#da70d6'; 228 $data['csstidy']['replace_colors']['palegoldenrod'] = '#eee8aa'; 229 $data['csstidy']['replace_colors']['palegreen'] = '#98fb98'; 230 $data['csstidy']['replace_colors']['paleturquoise'] = '#afeeee'; 231 $data['csstidy']['replace_colors']['palevioletred'] = '#d87093'; 232 $data['csstidy']['replace_colors']['papayawhip'] = '#ffefd5'; 233 $data['csstidy']['replace_colors']['peachpuff'] = '#ffdab9'; 234 $data['csstidy']['replace_colors']['peru'] = '#cd853f'; 235 $data['csstidy']['replace_colors']['pink'] = '#ffc0cb'; 236 $data['csstidy']['replace_colors']['plum'] = '#dda0dd'; 237 $data['csstidy']['replace_colors']['powderblue'] = '#b0e0e6'; 238 $data['csstidy']['replace_colors']['rosybrown'] = '#bc8f8f'; 239 $data['csstidy']['replace_colors']['royalblue'] = '#4169e1'; 240 $data['csstidy']['replace_colors']['saddlebrown'] = '#8b4513'; 241 $data['csstidy']['replace_colors']['salmon'] = '#fa8072'; 242 $data['csstidy']['replace_colors']['sandybrown'] = '#f4a460'; 243 $data['csstidy']['replace_colors']['seagreen'] = '#2e8b57'; 244 $data['csstidy']['replace_colors']['seashell'] = '#fff5ee'; 245 $data['csstidy']['replace_colors']['sienna'] = '#a0522d'; 246 $data['csstidy']['replace_colors']['skyblue'] = '#87ceeb'; 247 $data['csstidy']['replace_colors']['slateblue'] = '#6a5acd'; 248 $data['csstidy']['replace_colors']['slategray'] = '#708090'; 249 $data['csstidy']['replace_colors']['snow'] = '#fffafa'; 250 $data['csstidy']['replace_colors']['springgreen'] = '#00ff7f'; 251 $data['csstidy']['replace_colors']['steelblue'] = '#4682b4'; 252 $data['csstidy']['replace_colors']['tan'] = '#d2b48c'; 253 $data['csstidy']['replace_colors']['thistle'] = '#d8bfd8'; 254 $data['csstidy']['replace_colors']['tomato'] = '#ff6347'; 255 $data['csstidy']['replace_colors']['turquoise'] = '#40e0d0'; 256 $data['csstidy']['replace_colors']['violet'] = '#ee82ee'; 257 $data['csstidy']['replace_colors']['violetred'] = '#d02090'; 258 $data['csstidy']['replace_colors']['wheat'] = '#f5deb3'; 259 $data['csstidy']['replace_colors']['whitesmoke'] = '#f5f5f5'; 260 $data['csstidy']['replace_colors']['yellowgreen'] = '#9acd32'; 271 261 272 262 /** 273 263 * A list of all shorthand properties that are devided into four properties and/or have four subvalues 274 264 * 275 * @global array $ GLOBALS['csstidy']['shorthands']265 * @global array $data['csstidy']['shorthands'] 276 266 * @todo Are there new ones in CSS3? 277 267 * @see dissolve_4value_shorthands() … … 279 269 * @version 1.0 280 270 */ 281 $ GLOBALS['csstidy']['shorthands'] = array();282 $ GLOBALS['csstidy']['shorthands']['border-color'] = array('border-top-color','border-right-color','border-bottom-color','border-left-color');283 $ GLOBALS['csstidy']['shorthands']['border-style'] = array('border-top-style','border-right-style','border-bottom-style','border-left-style');284 $ GLOBALS['csstidy']['shorthands']['border-width'] = array('border-top-width','border-right-width','border-bottom-width','border-left-width');285 $ GLOBALS['csstidy']['shorthands']['margin'] = array('margin-top','margin-right','margin-bottom','margin-left');286 $ GLOBALS['csstidy']['shorthands']['padding'] = array('padding-top','padding-right','padding-bottom','padding-left');287 $ GLOBALS['csstidy']['shorthands']['-moz-border-radius'] = 0;271 $data['csstidy']['shorthands'] = array(); 272 $data['csstidy']['shorthands']['border-color'] = array('border-top-color','border-right-color','border-bottom-color','border-left-color'); 273 $data['csstidy']['shorthands']['border-style'] = array('border-top-style','border-right-style','border-bottom-style','border-left-style'); 274 $data['csstidy']['shorthands']['border-width'] = array('border-top-width','border-right-width','border-bottom-width','border-left-width'); 275 $data['csstidy']['shorthands']['margin'] = array('margin-top','margin-right','margin-bottom','margin-left'); 276 $data['csstidy']['shorthands']['padding'] = array('padding-top','padding-right','padding-bottom','padding-left'); 277 $data['csstidy']['shorthands']['-moz-border-radius'] = 0; 288 278 289 279 /** 290 280 * All CSS Properties. Needed for csstidy::property_is_next() 291 281 * 292 * @global array $ GLOBALS['csstidy']['all_properties']282 * @global array $data['csstidy']['all_properties'] 293 283 * @version 1.1 294 284 * @see csstidy::property_is_next() 295 285 */ 296 $ GLOBALS['csstidy']['all_properties']['alignment-adjust'] = 'CSS3.0';297 $ GLOBALS['csstidy']['all_properties']['alignment-baseline'] = 'CSS3.0';298 $ GLOBALS['csstidy']['all_properties']['animation'] = 'CSS3.0';299 $ GLOBALS['csstidy']['all_properties']['animation-delay'] = 'CSS3.0';300 $ GLOBALS['csstidy']['all_properties']['animation-direction'] = 'CSS3.0';301 $ GLOBALS['csstidy']['all_properties']['animation-duration'] = 'CSS3.0';302 $ GLOBALS['csstidy']['all_properties']['animation-iteration-count'] = 'CSS3.0';303 $ GLOBALS['csstidy']['all_properties']['animation-name'] = 'CSS3.0';304 $ GLOBALS['csstidy']['all_properties']['animation-play-state'] = 'CSS3.0';305 $ GLOBALS['csstidy']['all_properties']['animation-timing-function'] = 'CSS3.0';306 $ GLOBALS['csstidy']['all_properties']['appearance'] = 'CSS3.0';307 $ GLOBALS['csstidy']['all_properties']['azimuth'] = 'CSS2.0,CSS2.1,CSS3.0';308 $ GLOBALS['csstidy']['all_properties']['backface-visibility'] = 'CSS3.0';309 $ GLOBALS['csstidy']['all_properties']['background'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';310 $ GLOBALS['csstidy']['all_properties']['background-attachment'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';311 $ GLOBALS['csstidy']['all_properties']['background-clip'] = 'CSS3.0';312 $ GLOBALS['csstidy']['all_properties']['background-color'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';313 $ GLOBALS['csstidy']['all_properties']['background-image'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';314 $ GLOBALS['csstidy']['all_properties']['background-origin'] = 'CSS3.0';315 $ GLOBALS['csstidy']['all_properties']['background-position'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';316 $ GLOBALS['csstidy']['all_properties']['background-repeat'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';317 $ GLOBALS['csstidy']['all_properties']['background-size'] = 'CSS3.0';318 $ GLOBALS['csstidy']['all_properties']['baseline-shift'] = 'CSS3.0';319 $ GLOBALS['csstidy']['all_properties']['binding'] = 'CSS3.0';320 $ GLOBALS['csstidy']['all_properties']['bleed'] = 'CSS3.0';321 $ GLOBALS['csstidy']['all_properties']['bookmark-label'] = 'CSS3.0';322 $ GLOBALS['csstidy']['all_properties']['bookmark-level'] = 'CSS3.0';323 $ GLOBALS['csstidy']['all_properties']['bookmark-state'] = 'CSS3.0';324 $ GLOBALS['csstidy']['all_properties']['bookmark-target'] = 'CSS3.0';325 $ GLOBALS['csstidy']['all_properties']['border'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';326 $ GLOBALS['csstidy']['all_properties']['border-bottom'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';327 $ GLOBALS['csstidy']['all_properties']['border-bottom-color'] = 'CSS2.0,CSS2.1,CSS3.0';328 $ GLOBALS['csstidy']['all_properties']['border-bottom-left-radius'] = 'CSS3.0';329 $ GLOBALS['csstidy']['all_properties']['border-bottom-right-radius'] = 'CSS3.0';330 $ GLOBALS['csstidy']['all_properties']['border-bottom-style'] = 'CSS2.0,CSS2.1,CSS3.0';331 $ GLOBALS['csstidy']['all_properties']['border-bottom-width'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';332 $ GLOBALS['csstidy']['all_properties']['border-collapse'] = 'CSS2.0,CSS2.1,CSS3.0';333 $ GLOBALS['csstidy']['all_properties']['border-color'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';334 $ GLOBALS['csstidy']['all_properties']['border-image'] = 'CSS3.0';335 $ GLOBALS['csstidy']['all_properties']['border-image-outset'] = 'CSS3.0';336 $ GLOBALS['csstidy']['all_properties']['border-image-repeat'] = 'CSS3.0';337 $ GLOBALS['csstidy']['all_properties']['border-image-slice'] = 'CSS3.0';338 $ GLOBALS['csstidy']['all_properties']['border-image-source'] = 'CSS3.0';339 $ GLOBALS['csstidy']['all_properties']['border-image-width'] = 'CSS3.0';340 $ GLOBALS['csstidy']['all_properties']['border-left'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';341 $ GLOBALS['csstidy']['all_properties']['border-left-color'] = 'CSS2.0,CSS2.1,CSS3.0';342 $ GLOBALS['csstidy']['all_properties']['border-left-style'] = 'CSS2.0,CSS2.1,CSS3.0';343 $ GLOBALS['csstidy']['all_properties']['border-left-width'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';344 $ GLOBALS['csstidy']['all_properties']['border-radius'] = 'CSS3.0';345 $ GLOBALS['csstidy']['all_properties']['border-right'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';346 $ GLOBALS['csstidy']['all_properties']['border-right-color'] = 'CSS2.0,CSS2.1,CSS3.0';347 $ GLOBALS['csstidy']['all_properties']['border-right-style'] = 'CSS2.0,CSS2.1,CSS3.0';348 $ GLOBALS['csstidy']['all_properties']['border-right-width'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';349 $ GLOBALS['csstidy']['all_properties']['border-spacing'] = 'CSS2.0,CSS2.1,CSS3.0';350 $ GLOBALS['csstidy']['all_properties']['border-style'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';351 $ GLOBALS['csstidy']['all_properties']['border-top'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';352 $ GLOBALS['csstidy']['all_properties']['border-top-color'] = 'CSS2.0,CSS2.1,CSS3.0';353 $ GLOBALS['csstidy']['all_properties']['border-top-left-radius'] = 'CSS3.0';354 $ GLOBALS['csstidy']['all_properties']['border-top-right-radius'] = 'CSS3.0';355 $ GLOBALS['csstidy']['all_properties']['border-top-style'] = 'CSS2.0,CSS2.1,CSS3.0';356 $ GLOBALS['csstidy']['all_properties']['border-top-width'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';357 $ GLOBALS['csstidy']['all_properties']['border-width'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';358 $ GLOBALS['csstidy']['all_properties']['bottom'] = 'CSS2.0,CSS2.1,CSS3.0';359 $ GLOBALS['csstidy']['all_properties']['box-decoration-break'] = 'CSS3.0';360 $ GLOBALS['csstidy']['all_properties']['box-shadow'] = 'CSS3.0';361 $ GLOBALS['csstidy']['all_properties']['box-sizing'] = 'CSS3.0';362 $ GLOBALS['csstidy']['all_properties']['break-after'] = 'CSS3.0';363 $ GLOBALS['csstidy']['all_properties']['break-before'] = 'CSS3.0';364 $ GLOBALS['csstidy']['all_properties']['break-inside'] = 'CSS3.0';365 $ GLOBALS['csstidy']['all_properties']['caption-side'] = 'CSS2.0,CSS2.1,CSS3.0';366 $ GLOBALS['csstidy']['all_properties']['clear'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';367 $ GLOBALS['csstidy']['all_properties']['clip'] = 'CSS2.0,CSS2.1,CSS3.0';368 $ GLOBALS['csstidy']['all_properties']['color'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';369 $ GLOBALS['csstidy']['all_properties']['color-profile'] = 'CSS3.0';370 $ GLOBALS['csstidy']['all_properties']['column-count'] = 'CSS3.0';371 $ GLOBALS['csstidy']['all_properties']['column-fill'] = 'CSS3.0';372 $ GLOBALS['csstidy']['all_properties']['column-gap'] = 'CSS3.0';373 $ GLOBALS['csstidy']['all_properties']['column-rule'] = 'CSS3.0';374 $ GLOBALS['csstidy']['all_properties']['column-rule-color'] = 'CSS3.0';375 $ GLOBALS['csstidy']['all_properties']['column-rule-style'] = 'CSS3.0';376 $ GLOBALS['csstidy']['all_properties']['column-rule-width'] = 'CSS3.0';377 $ GLOBALS['csstidy']['all_properties']['column-span'] = 'CSS3.0';378 $ GLOBALS['csstidy']['all_properties']['column-width'] = 'CSS3.0';379 $ GLOBALS['csstidy']['all_properties']['columns'] = 'CSS3.0';380 $ GLOBALS['csstidy']['all_properties']['content'] = 'CSS2.0,CSS2.1,CSS3.0';381 $ GLOBALS['csstidy']['all_properties']['counter-increment'] = 'CSS2.0,CSS2.1,CSS3.0';382 $ GLOBALS['csstidy']['all_properties']['counter-reset'] = 'CSS2.0,CSS2.1,CSS3.0';383 $ GLOBALS['csstidy']['all_properties']['crop'] = 'CSS3.0';384 $ GLOBALS['csstidy']['all_properties']['cue'] = 'CSS2.0,CSS2.1,CSS3.0';385 $ GLOBALS['csstidy']['all_properties']['cue-after'] = 'CSS2.0,CSS2.1,CSS3.0';386 $ GLOBALS['csstidy']['all_properties']['cue-before'] = 'CSS2.0,CSS2.1,CSS3.0';387 $ GLOBALS['csstidy']['all_properties']['cursor'] = 'CSS2.0,CSS2.1,CSS3.0';388 $ GLOBALS['csstidy']['all_properties']['direction'] = 'CSS2.0,CSS2.1,CSS3.0';389 $ GLOBALS['csstidy']['all_properties']['display'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';390 $ GLOBALS['csstidy']['all_properties']['dominant-baseline'] = 'CSS3.0';391 $ GLOBALS['csstidy']['all_properties']['drop-initial-after-adjust'] = 'CSS3.0';392 $ GLOBALS['csstidy']['all_properties']['drop-initial-after-align'] = 'CSS3.0';393 $ GLOBALS['csstidy']['all_properties']['drop-initial-before-adjust'] = 'CSS3.0';394 $ GLOBALS['csstidy']['all_properties']['drop-initial-before-align'] = 'CSS3.0';395 $ GLOBALS['csstidy']['all_properties']['drop-initial-size'] = 'CSS3.0';396 $ GLOBALS['csstidy']['all_properties']['drop-initial-value'] = 'CSS3.0';397 $ GLOBALS['csstidy']['all_properties']['elevation'] = 'CSS2.0,CSS2.1,CSS3.0';398 $ GLOBALS['csstidy']['all_properties']['empty-cells'] = 'CSS2.0,CSS2.1,CSS3.0';399 $ GLOBALS['csstidy']['all_properties']['fit'] = 'CSS3.0';400 $ GLOBALS['csstidy']['all_properties']['fit-position'] = 'CSS3.0';401 $ GLOBALS['csstidy']['all_properties']['flex-align'] = 'CSS3.0';402 $ GLOBALS['csstidy']['all_properties']['flex-flow'] = 'CSS3.0';403 $ GLOBALS['csstidy']['all_properties']['flex-line-pack'] = 'CSS3.0';404 $ GLOBALS['csstidy']['all_properties']['flex-order'] = 'CSS3.0';405 $ GLOBALS['csstidy']['all_properties']['flex-pack'] = 'CSS3.0';406 $ GLOBALS['csstidy']['all_properties']['float'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';407 $ GLOBALS['csstidy']['all_properties']['float-offset'] = 'CSS3.0';408 $ GLOBALS['csstidy']['all_properties']['font'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';409 $ GLOBALS['csstidy']['all_properties']['font-family'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';410 $ GLOBALS['csstidy']['all_properties']['font-size'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';411 $ GLOBALS['csstidy']['all_properties']['font-size-adjust'] = 'CSS2.0,CSS3.0';412 $ GLOBALS['csstidy']['all_properties']['font-stretch'] = 'CSS2.0,CSS3.0';413 $ GLOBALS['csstidy']['all_properties']['font-style'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';414 $ GLOBALS['csstidy']['all_properties']['font-variant'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';415 $ GLOBALS['csstidy']['all_properties']['font-weight'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';416 $ GLOBALS['csstidy']['all_properties']['grid-columns'] = 'CSS3.0';417 $ GLOBALS['csstidy']['all_properties']['grid-rows'] = 'CSS3.0';418 $ GLOBALS['csstidy']['all_properties']['hanging-punctuation'] = 'CSS3.0';419 $ GLOBALS['csstidy']['all_properties']['height'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';420 $ GLOBALS['csstidy']['all_properties']['hyphenate-after'] = 'CSS3.0';421 $ GLOBALS['csstidy']['all_properties']['hyphenate-before'] = 'CSS3.0';422 $ GLOBALS['csstidy']['all_properties']['hyphenate-character'] = 'CSS3.0';423 $ GLOBALS['csstidy']['all_properties']['hyphenate-lines'] = 'CSS3.0';424 $ GLOBALS['csstidy']['all_properties']['hyphenate-resource'] = 'CSS3.0';425 $ GLOBALS['csstidy']['all_properties']['hyphens'] = 'CSS3.0';426 $ GLOBALS['csstidy']['all_properties']['icon'] = 'CSS3.0';427 $ GLOBALS['csstidy']['all_properties']['image-orientation'] = 'CSS3.0';428 $ GLOBALS['csstidy']['all_properties']['image-rendering'] = 'CSS3.0';429 $ GLOBALS['csstidy']['all_properties']['image-resolution'] = 'CSS3.0';430 $ GLOBALS['csstidy']['all_properties']['inline-box-align'] = 'CSS3.0';431 $ GLOBALS['csstidy']['all_properties']['left'] = 'CSS2.0,CSS2.1,CSS3.0';432 $ GLOBALS['csstidy']['all_properties']['letter-spacing'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';433 $ GLOBALS['csstidy']['all_properties']['line-break'] = 'CSS3.0';434 $ GLOBALS['csstidy']['all_properties']['line-height'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';435 $ GLOBALS['csstidy']['all_properties']['line-stacking'] = 'CSS3.0';436 $ GLOBALS['csstidy']['all_properties']['line-stacking-ruby'] = 'CSS3.0';437 $ GLOBALS['csstidy']['all_properties']['line-stacking-shift'] = 'CSS3.0';438 $ GLOBALS['csstidy']['all_properties']['line-stacking-strategy'] = 'CSS3.0';439 $ GLOBALS['csstidy']['all_properties']['list-style'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';440 $ GLOBALS['csstidy']['all_properties']['list-style-image'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';441 $ GLOBALS['csstidy']['all_properties']['list-style-position'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';442 $ GLOBALS['csstidy']['all_properties']['list-style-type'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';443 $ GLOBALS['csstidy']['all_properties']['margin'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';444 $ GLOBALS['csstidy']['all_properties']['margin-bottom'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';445 $ GLOBALS['csstidy']['all_properties']['margin-left'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';446 $ GLOBALS['csstidy']['all_properties']['margin-right'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';447 $ GLOBALS['csstidy']['all_properties']['margin-top'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';448 $ GLOBALS['csstidy']['all_properties']['marker-offset'] = 'CSS2.0,CSS3.0';449 $ GLOBALS['csstidy']['all_properties']['marks'] = 'CSS2.0,CSS3.0';450 $ GLOBALS['csstidy']['all_properties']['marquee-direction'] = 'CSS3.0';451 $ GLOBALS['csstidy']['all_properties']['marquee-loop'] = 'CSS3.0';452 $ GLOBALS['csstidy']['all_properties']['marquee-play-count'] = 'CSS3.0';453 $ GLOBALS['csstidy']['all_properties']['marquee-speed'] = 'CSS3.0';454 $ GLOBALS['csstidy']['all_properties']['marquee-style'] = 'CSS3.0';455 $ GLOBALS['csstidy']['all_properties']['max-height'] = 'CSS2.0,CSS2.1,CSS3.0';456 $ GLOBALS['csstidy']['all_properties']['max-width'] = 'CSS2.0,CSS2.1,CSS3.0';457 $ GLOBALS['csstidy']['all_properties']['min-height'] = 'CSS2.0,CSS2.1,CSS3.0';458 $ GLOBALS['csstidy']['all_properties']['min-width'] = 'CSS2.0,CSS2.1,CSS3.0';459 $ GLOBALS['csstidy']['all_properties']['move-to'] = 'CSS3.0';460 $ GLOBALS['csstidy']['all_properties']['nav-down'] = 'CSS3.0';461 $ GLOBALS['csstidy']['all_properties']['nav-index'] = 'CSS3.0';462 $ GLOBALS['csstidy']['all_properties']['nav-left'] = 'CSS3.0';463 $ GLOBALS['csstidy']['all_properties']['nav-right'] = 'CSS3.0';464 $ GLOBALS['csstidy']['all_properties']['nav-up'] = 'CSS3.0';465 $ GLOBALS['csstidy']['all_properties']['opacity'] = 'CSS3.0';466 $ GLOBALS['csstidy']['all_properties']['orphans'] = 'CSS2.0,CSS2.1,CSS3.0';467 $ GLOBALS['csstidy']['all_properties']['outline'] = 'CSS2.0,CSS2.1,CSS3.0';468 $ GLOBALS['csstidy']['all_properties']['outline-color'] = 'CSS2.0,CSS2.1,CSS3.0';469 $ GLOBALS['csstidy']['all_properties']['outline-offset'] = 'CSS3.0';470 $ GLOBALS['csstidy']['all_properties']['outline-style'] = 'CSS2.0,CSS2.1,CSS3.0';471 $ GLOBALS['csstidy']['all_properties']['outline-width'] = 'CSS2.0,CSS2.1,CSS3.0';472 $ GLOBALS['csstidy']['all_properties']['overflow'] = 'CSS2.0,CSS2.1,CSS3.0';473 $ GLOBALS['csstidy']['all_properties']['overflow-style'] = 'CSS3.0';474 $ GLOBALS['csstidy']['all_properties']['overflow-wrap'] = 'CSS3.0';475 $ GLOBALS['csstidy']['all_properties']['overflow-x'] = 'CSS3.0';476 $ GLOBALS['csstidy']['all_properties']['overflow-y'] = 'CSS3.0';477 $ GLOBALS['csstidy']['all_properties']['padding'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';478 $ GLOBALS['csstidy']['all_properties']['padding-bottom'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';479 $ GLOBALS['csstidy']['all_properties']['padding-left'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';480 $ GLOBALS['csstidy']['all_properties']['padding-right'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';481 $ GLOBALS['csstidy']['all_properties']['padding-top'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';482 $ GLOBALS['csstidy']['all_properties']['page'] = 'CSS2.0,CSS3.0';483 $ GLOBALS['csstidy']['all_properties']['page-break-after'] = 'CSS2.0,CSS2.1,CSS3.0';484 $ GLOBALS['csstidy']['all_properties']['page-break-before'] = 'CSS2.0,CSS2.1,CSS3.0';485 $ GLOBALS['csstidy']['all_properties']['page-break-inside'] = 'CSS2.0,CSS2.1,CSS3.0';486 $ GLOBALS['csstidy']['all_properties']['page-policy'] = 'CSS3.0';487 $ GLOBALS['csstidy']['all_properties']['pause'] = 'CSS2.0,CSS2.1,CSS3.0';488 $ GLOBALS['csstidy']['all_properties']['pause-after'] = 'CSS2.0,CSS2.1,CSS3.0';489 $ GLOBALS['csstidy']['all_properties']['pause-before'] = 'CSS2.0,CSS2.1,CSS3.0';490 $ GLOBALS['csstidy']['all_properties']['perspective'] = 'CSS3.0';491 $ GLOBALS['csstidy']['all_properties']['perspective-origin'] = 'CSS3.0';492 $ GLOBALS['csstidy']['all_properties']['phonemes'] = 'CSS3.0';493 $ GLOBALS['csstidy']['all_properties']['pitch'] = 'CSS2.0,CSS2.1,CSS3.0';494 $ GLOBALS['csstidy']['all_properties']['pitch-range'] = 'CSS2.0,CSS2.1,CSS3.0';495 $ GLOBALS['csstidy']['all_properties']['play-during'] = 'CSS2.0,CSS2.1,CSS3.0';496 $ GLOBALS['csstidy']['all_properties']['position'] = 'CSS2.0,CSS2.1,CSS3.0';497 $ GLOBALS['csstidy']['all_properties']['presentation-level'] = 'CSS3.0';498 $ GLOBALS['csstidy']['all_properties']['punctuation-trim'] = 'CSS3.0';499 $ GLOBALS['csstidy']['all_properties']['quotes'] = 'CSS2.0,CSS2.1,CSS3.0';500 $ GLOBALS['csstidy']['all_properties']['rendering-intent'] = 'CSS3.0';501 $ GLOBALS['csstidy']['all_properties']['resize'] = 'CSS3.0';502 $ GLOBALS['csstidy']['all_properties']['rest'] = 'CSS3.0';503 $ GLOBALS['csstidy']['all_properties']['rest-after'] = 'CSS3.0';504 $ GLOBALS['csstidy']['all_properties']['rest-before'] = 'CSS3.0';505 $ GLOBALS['csstidy']['all_properties']['richness'] = 'CSS2.0,CSS2.1,CSS3.0';506 $ GLOBALS['csstidy']['all_properties']['right'] = 'CSS2.0,CSS2.1,CSS3.0';507 $ GLOBALS['csstidy']['all_properties']['rotation'] = 'CSS3.0';508 $ GLOBALS['csstidy']['all_properties']['rotation-point'] = 'CSS3.0';509 $ GLOBALS['csstidy']['all_properties']['ruby-align'] = 'CSS3.0';510 $ GLOBALS['csstidy']['all_properties']['ruby-overhang'] = 'CSS3.0';511 $ GLOBALS['csstidy']['all_properties']['ruby-position'] = 'CSS3.0';512 $ GLOBALS['csstidy']['all_properties']['ruby-span'] = 'CSS3.0';513 $ GLOBALS['csstidy']['all_properties']['size'] = 'CSS2.0,CSS3.0';514 $ GLOBALS['csstidy']['all_properties']['speak'] = 'CSS2.0,CSS2.1,CSS3.0';515 $ GLOBALS['csstidy']['all_properties']['speak-header'] = 'CSS2.0,CSS2.1,CSS3.0';516 $ GLOBALS['csstidy']['all_properties']['speak-numeral'] = 'CSS2.0,CSS2.1,CSS3.0';517 $ GLOBALS['csstidy']['all_properties']['speak-punctuation'] = 'CSS2.0,CSS2.1,CSS3.0';518 $ GLOBALS['csstidy']['all_properties']['speech-rate'] = 'CSS2.0,CSS2.1,CSS3.0';519 $ GLOBALS['csstidy']['all_properties']['src'] = 'CSS3.0';520 $ GLOBALS['csstidy']['all_properties']['stress'] = 'CSS2.0,CSS2.1,CSS3.0';521 $ GLOBALS['csstidy']['all_properties']['string-set'] = 'CSS3.0';522 $ GLOBALS['csstidy']['all_properties']['tab-size'] = 'CSS3.0';523 $ GLOBALS['csstidy']['all_properties']['table-layout'] = 'CSS2.0,CSS2.1,CSS3.0';524 $ GLOBALS['csstidy']['all_properties']['target'] = 'CSS3.0';525 $ GLOBALS['csstidy']['all_properties']['target-name'] = 'CSS3.0';526 $ GLOBALS['csstidy']['all_properties']['target-new'] = 'CSS3.0';527 $ GLOBALS['csstidy']['all_properties']['target-position'] = 'CSS3.0';528 $ GLOBALS['csstidy']['all_properties']['text-align'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';529 $ GLOBALS['csstidy']['all_properties']['text-align-last'] = 'CSS3.0';530 $ GLOBALS['csstidy']['all_properties']['text-decoration'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';531 $ GLOBALS['csstidy']['all_properties']['text-decoration-color'] = 'CSS3.0';532 $ GLOBALS['csstidy']['all_properties']['text-decoration-line'] = 'CSS3.0';533 $ GLOBALS['csstidy']['all_properties']['text-decoration-skip'] = 'CSS3.0';534 $ GLOBALS['csstidy']['all_properties']['text-decoration-style'] = 'CSS3.0';535 $ GLOBALS['csstidy']['all_properties']['text-emphasis'] = 'CSS3.0';536 $ GLOBALS['csstidy']['all_properties']['text-emphasis-color'] = 'CSS3.0';537 $ GLOBALS['csstidy']['all_properties']['text-emphasis-position'] = 'CSS3.0';538 $ GLOBALS['csstidy']['all_properties']['text-emphasis-style'] = 'CSS3.0';539 $ GLOBALS['csstidy']['all_properties']['text-height'] = 'CSS3.0';540 $ GLOBALS['csstidy']['all_properties']['text-indent'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';541 $ GLOBALS['csstidy']['all_properties']['text-justify'] = 'CSS3.0';542 $ GLOBALS['csstidy']['all_properties']['text-outline'] = 'CSS3.0';543 $ GLOBALS['csstidy']['all_properties']['text-shadow'] = 'CSS2.0,CSS3.0';544 $ GLOBALS['csstidy']['all_properties']['text-space-collapse'] = 'CSS3.0';545 $ GLOBALS['csstidy']['all_properties']['text-transform'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';546 $ GLOBALS['csstidy']['all_properties']['text-underline-position'] = 'CSS3.0';547 $ GLOBALS['csstidy']['all_properties']['text-wrap'] = 'CSS3.0';548 $ GLOBALS['csstidy']['all_properties']['top'] = 'CSS2.0,CSS2.1,CSS3.0';549 $ GLOBALS['csstidy']['all_properties']['transform'] = 'CSS3.0';550 $ GLOBALS['csstidy']['all_properties']['transform-origin'] = 'CSS3.0';551 $ GLOBALS['csstidy']['all_properties']['transform-style'] = 'CSS3.0';552 $ GLOBALS['csstidy']['all_properties']['transition'] = 'CSS3.0';553 $ GLOBALS['csstidy']['all_properties']['transition-delay'] = 'CSS3.0';554 $ GLOBALS['csstidy']['all_properties']['transition-duration'] = 'CSS3.0';555 $ GLOBALS['csstidy']['all_properties']['transition-property'] = 'CSS3.0';556 $ GLOBALS['csstidy']['all_properties']['transition-timing-function'] = 'CSS3.0';557 $ GLOBALS['csstidy']['all_properties']['unicode-bidi'] = 'CSS2.0,CSS2.1,CSS3.0';558 $ GLOBALS['csstidy']['all_properties']['vertical-align'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';559 $ GLOBALS['csstidy']['all_properties']['visibility'] = 'CSS2.0,CSS2.1,CSS3.0';560 $ GLOBALS['csstidy']['all_properties']['voice-balance'] = 'CSS3.0';561 $ GLOBALS['csstidy']['all_properties']['voice-duration'] = 'CSS3.0';562 $ GLOBALS['csstidy']['all_properties']['voice-family'] = 'CSS2.0,CSS2.1,CSS3.0';563 $ GLOBALS['csstidy']['all_properties']['voice-pitch'] = 'CSS3.0';564 $ GLOBALS['csstidy']['all_properties']['voice-pitch-range'] = 'CSS3.0';565 $ GLOBALS['csstidy']['all_properties']['voice-rate'] = 'CSS3.0';566 $ GLOBALS['csstidy']['all_properties']['voice-stress'] = 'CSS3.0';567 $ GLOBALS['csstidy']['all_properties']['voice-volume'] = 'CSS3.0';568 $ GLOBALS['csstidy']['all_properties']['volume'] = 'CSS2.0,CSS2.1,CSS3.0';569 $ GLOBALS['csstidy']['all_properties']['white-space'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';570 $ GLOBALS['csstidy']['all_properties']['widows'] = 'CSS2.0,CSS2.1,CSS3.0';571 $ GLOBALS['csstidy']['all_properties']['width'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';572 $ GLOBALS['csstidy']['all_properties']['word-break'] = 'CSS3.0';573 $ GLOBALS['csstidy']['all_properties']['word-spacing'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0';574 $ GLOBALS['csstidy']['all_properties']['word-wrap'] = 'CSS3.0';575 $ GLOBALS['csstidy']['all_properties']['z-index'] = 'CSS2.0,CSS2.1,CSS3.0';286 $data['csstidy']['all_properties']['alignment-adjust'] = 'CSS3.0'; 287 $data['csstidy']['all_properties']['alignment-baseline'] = 'CSS3.0'; 288 $data['csstidy']['all_properties']['animation'] = 'CSS3.0'; 289 $data['csstidy']['all_properties']['animation-delay'] = 'CSS3.0'; 290 $data['csstidy']['all_properties']['animation-direction'] = 'CSS3.0'; 291 $data['csstidy']['all_properties']['animation-duration'] = 'CSS3.0'; 292 $data['csstidy']['all_properties']['animation-iteration-count'] = 'CSS3.0'; 293 $data['csstidy']['all_properties']['animation-name'] = 'CSS3.0'; 294 $data['csstidy']['all_properties']['animation-play-state'] = 'CSS3.0'; 295 $data['csstidy']['all_properties']['animation-timing-function'] = 'CSS3.0'; 296 $data['csstidy']['all_properties']['appearance'] = 'CSS3.0'; 297 $data['csstidy']['all_properties']['azimuth'] = 'CSS2.0,CSS2.1,CSS3.0'; 298 $data['csstidy']['all_properties']['backface-visibility'] = 'CSS3.0'; 299 $data['csstidy']['all_properties']['background'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0'; 300 $data['csstidy']['all_properties']['background-attachment'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0'; 301 $data['csstidy']['all_properties']['background-clip'] = 'CSS3.0'; 302 $data['csstidy']['all_properties']['background-color'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0'; 303 $data['csstidy']['all_properties']['background-image'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0'; 304 $data['csstidy']['all_properties']['background-origin'] = 'CSS3.0'; 305 $data['csstidy']['all_properties']['background-position'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0'; 306 $data['csstidy']['all_properties']['background-repeat'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0'; 307 $data['csstidy']['all_properties']['background-size'] = 'CSS3.0'; 308 $data['csstidy']['all_properties']['baseline-shift'] = 'CSS3.0'; 309 $data['csstidy']['all_properties']['binding'] = 'CSS3.0'; 310 $data['csstidy']['all_properties']['bleed'] = 'CSS3.0'; 311 $data['csstidy']['all_properties']['bookmark-label'] = 'CSS3.0'; 312 $data['csstidy']['all_properties']['bookmark-level'] = 'CSS3.0'; 313 $data['csstidy']['all_properties']['bookmark-state'] = 'CSS3.0'; 314 $data['csstidy']['all_properties']['bookmark-target'] = 'CSS3.0'; 315 $data['csstidy']['all_properties']['border'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0'; 316 $data['csstidy']['all_properties']['border-bottom'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0'; 317 $data['csstidy']['all_properties']['border-bottom-color'] = 'CSS2.0,CSS2.1,CSS3.0'; 318 $data['csstidy']['all_properties']['border-bottom-left-radius'] = 'CSS3.0'; 319 $data['csstidy']['all_properties']['border-bottom-right-radius'] = 'CSS3.0'; 320 $data['csstidy']['all_properties']['border-bottom-style'] = 'CSS2.0,CSS2.1,CSS3.0'; 321 $data['csstidy']['all_properties']['border-bottom-width'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0'; 322 $data['csstidy']['all_properties']['border-collapse'] = 'CSS2.0,CSS2.1,CSS3.0'; 323 $data['csstidy']['all_properties']['border-color'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0'; 324 $data['csstidy']['all_properties']['border-image'] = 'CSS3.0'; 325 $data['csstidy']['all_properties']['border-image-outset'] = 'CSS3.0'; 326 $data['csstidy']['all_properties']['border-image-repeat'] = 'CSS3.0'; 327 $data['csstidy']['all_properties']['border-image-slice'] = 'CSS3.0'; 328 $data['csstidy']['all_properties']['border-image-source'] = 'CSS3.0'; 329 $data['csstidy']['all_properties']['border-image-width'] = 'CSS3.0'; 330 $data['csstidy']['all_properties']['border-left'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0'; 331 $data['csstidy']['all_properties']['border-left-color'] = 'CSS2.0,CSS2.1,CSS3.0'; 332 $data['csstidy']['all_properties']['border-left-style'] = 'CSS2.0,CSS2.1,CSS3.0'; 333 $data['csstidy']['all_properties']['border-left-width'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0'; 334 $data['csstidy']['all_properties']['border-radius'] = 'CSS3.0'; 335 $data['csstidy']['all_properties']['border-right'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0'; 336 $data['csstidy']['all_properties']['border-right-color'] = 'CSS2.0,CSS2.1,CSS3.0'; 337 $data['csstidy']['all_properties']['border-right-style'] = 'CSS2.0,CSS2.1,CSS3.0'; 338 $data['csstidy']['all_properties']['border-right-width'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0'; 339 $data['csstidy']['all_properties']['border-spacing'] = 'CSS2.0,CSS2.1,CSS3.0'; 340 $data['csstidy']['all_properties']['border-style'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0'; 341 $data['csstidy']['all_properties']['border-top'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0'; 342 $data['csstidy']['all_properties']['border-top-color'] = 'CSS2.0,CSS2.1,CSS3.0'; 343 $data['csstidy']['all_properties']['border-top-left-radius'] = 'CSS3.0'; 344 $data['csstidy']['all_properties']['border-top-right-radius'] = 'CSS3.0'; 345 $data['csstidy']['all_properties']['border-top-style'] = 'CSS2.0,CSS2.1,CSS3.0'; 346 $data['csstidy']['all_properties']['border-top-width'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0'; 347 $data['csstidy']['all_properties']['border-width'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0'; 348 $data['csstidy']['all_properties']['bottom'] = 'CSS2.0,CSS2.1,CSS3.0'; 349 $data['csstidy']['all_properties']['box-decoration-break'] = 'CSS3.0'; 350 $data['csstidy']['all_properties']['box-shadow'] = 'CSS3.0'; 351 $data['csstidy']['all_properties']['box-sizing'] = 'CSS3.0'; 352 $data['csstidy']['all_properties']['break-after'] = 'CSS3.0'; 353 $data['csstidy']['all_properties']['break-before'] = 'CSS3.0'; 354 $data['csstidy']['all_properties']['break-inside'] = 'CSS3.0'; 355 $data['csstidy']['all_properties']['caption-side'] = 'CSS2.0,CSS2.1,CSS3.0'; 356 $data['csstidy']['all_properties']['clear'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0'; 357 $data['csstidy']['all_properties']['clip'] = 'CSS2.0,CSS2.1,CSS3.0'; 358 $data['csstidy']['all_properties']['color'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0'; 359 $data['csstidy']['all_properties']['color-profile'] = 'CSS3.0'; 360 $data['csstidy']['all_properties']['column-count'] = 'CSS3.0'; 361 $data['csstidy']['all_properties']['column-fill'] = 'CSS3.0'; 362 $data['csstidy']['all_properties']['column-gap'] = 'CSS3.0'; 363 $data['csstidy']['all_properties']['column-rule'] = 'CSS3.0'; 364 $data['csstidy']['all_properties']['column-rule-color'] = 'CSS3.0'; 365 $data['csstidy']['all_properties']['column-rule-style'] = 'CSS3.0'; 366 $data['csstidy']['all_properties']['column-rule-width'] = 'CSS3.0'; 367 $data['csstidy']['all_properties']['column-span'] = 'CSS3.0'; 368 $data['csstidy']['all_properties']['column-width'] = 'CSS3.0'; 369 $data['csstidy']['all_properties']['columns'] = 'CSS3.0'; 370 $data['csstidy']['all_properties']['content'] = 'CSS2.0,CSS2.1,CSS3.0'; 371 $data['csstidy']['all_properties']['counter-increment'] = 'CSS2.0,CSS2.1,CSS3.0'; 372 $data['csstidy']['all_properties']['counter-reset'] = 'CSS2.0,CSS2.1,CSS3.0'; 373 $data['csstidy']['all_properties']['crop'] = 'CSS3.0'; 374 $data['csstidy']['all_properties']['cue'] = 'CSS2.0,CSS2.1,CSS3.0'; 375 $data['csstidy']['all_properties']['cue-after'] = 'CSS2.0,CSS2.1,CSS3.0'; 376 $data['csstidy']['all_properties']['cue-before'] = 'CSS2.0,CSS2.1,CSS3.0'; 377 $data['csstidy']['all_properties']['cursor'] = 'CSS2.0,CSS2.1,CSS3.0'; 378 $data['csstidy']['all_properties']['direction'] = 'CSS2.0,CSS2.1,CSS3.0'; 379 $data['csstidy']['all_properties']['display'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0'; 380 $data['csstidy']['all_properties']['dominant-baseline'] = 'CSS3.0'; 381 $data['csstidy']['all_properties']['drop-initial-after-adjust'] = 'CSS3.0'; 382 $data['csstidy']['all_properties']['drop-initial-after-align'] = 'CSS3.0'; 383 $data['csstidy']['all_properties']['drop-initial-before-adjust'] = 'CSS3.0'; 384 $data['csstidy']['all_properties']['drop-initial-before-align'] = 'CSS3.0'; 385 $data['csstidy']['all_properties']['drop-initial-size'] = 'CSS3.0'; 386 $data['csstidy']['all_properties']['drop-initial-value'] = 'CSS3.0'; 387 $data['csstidy']['all_properties']['elevation'] = 'CSS2.0,CSS2.1,CSS3.0'; 388 $data['csstidy']['all_properties']['empty-cells'] = 'CSS2.0,CSS2.1,CSS3.0'; 389 $data['csstidy']['all_properties']['fit'] = 'CSS3.0'; 390 $data['csstidy']['all_properties']['fit-position'] = 'CSS3.0'; 391 $data['csstidy']['all_properties']['flex-align'] = 'CSS3.0'; 392 $data['csstidy']['all_properties']['flex-flow'] = 'CSS3.0'; 393 $data['csstidy']['all_properties']['flex-line-pack'] = 'CSS3.0'; 394 $data['csstidy']['all_properties']['flex-order'] = 'CSS3.0'; 395 $data['csstidy']['all_properties']['flex-pack'] = 'CSS3.0'; 396 $data['csstidy']['all_properties']['float'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0'; 397 $data['csstidy']['all_properties']['float-offset'] = 'CSS3.0'; 398 $data['csstidy']['all_properties']['font'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0'; 399 $data['csstidy']['all_properties']['font-family'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0'; 400 $data['csstidy']['all_properties']['font-size'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0'; 401 $data['csstidy']['all_properties']['font-size-adjust'] = 'CSS2.0,CSS3.0'; 402 $data['csstidy']['all_properties']['font-stretch'] = 'CSS2.0,CSS3.0'; 403 $data['csstidy']['all_properties']['font-style'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0'; 404 $data['csstidy']['all_properties']['font-variant'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0'; 405 $data['csstidy']['all_properties']['font-weight'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0'; 406 $data['csstidy']['all_properties']['grid-columns'] = 'CSS3.0'; 407 $data['csstidy']['all_properties']['grid-rows'] = 'CSS3.0'; 408 $data['csstidy']['all_properties']['hanging-punctuation'] = 'CSS3.0'; 409 $data['csstidy']['all_properties']['height'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0'; 410 $data['csstidy']['all_properties']['hyphenate-after'] = 'CSS3.0'; 411 $data['csstidy']['all_properties']['hyphenate-before'] = 'CSS3.0'; 412 $data['csstidy']['all_properties']['hyphenate-character'] = 'CSS3.0'; 413 $data['csstidy']['all_properties']['hyphenate-lines'] = 'CSS3.0'; 414 $data['csstidy']['all_properties']['hyphenate-resource'] = 'CSS3.0'; 415 $data['csstidy']['all_properties']['hyphens'] = 'CSS3.0'; 416 $data['csstidy']['all_properties']['icon'] = 'CSS3.0'; 417 $data['csstidy']['all_properties']['image-orientation'] = 'CSS3.0'; 418 $data['csstidy']['all_properties']['image-rendering'] = 'CSS3.0'; 419 $data['csstidy']['all_properties']['image-resolution'] = 'CSS3.0'; 420 $data['csstidy']['all_properties']['inline-box-align'] = 'CSS3.0'; 421 $data['csstidy']['all_properties']['left'] = 'CSS2.0,CSS2.1,CSS3.0'; 422 $data['csstidy']['all_properties']['letter-spacing'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0'; 423 $data['csstidy']['all_properties']['line-break'] = 'CSS3.0'; 424 $data['csstidy']['all_properties']['line-height'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0'; 425 $data['csstidy']['all_properties']['line-stacking'] = 'CSS3.0'; 426 $data['csstidy']['all_properties']['line-stacking-ruby'] = 'CSS3.0'; 427 $data['csstidy']['all_properties']['line-stacking-shift'] = 'CSS3.0'; 428 $data['csstidy']['all_properties']['line-stacking-strategy'] = 'CSS3.0'; 429 $data['csstidy']['all_properties']['list-style'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0'; 430 $data['csstidy']['all_properties']['list-style-image'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0'; 431 $data['csstidy']['all_properties']['list-style-position'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0'; 432 $data['csstidy']['all_properties']['list-style-type'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0'; 433 $data['csstidy']['all_properties']['margin'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0'; 434 $data['csstidy']['all_properties']['margin-bottom'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0'; 435 $data['csstidy']['all_properties']['margin-left'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0'; 436 $data['csstidy']['all_properties']['margin-right'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0'; 437 $data['csstidy']['all_properties']['margin-top'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0'; 438 $data['csstidy']['all_properties']['marker-offset'] = 'CSS2.0,CSS3.0'; 439 $data['csstidy']['all_properties']['marks'] = 'CSS2.0,CSS3.0'; 440 $data['csstidy']['all_properties']['marquee-direction'] = 'CSS3.0'; 441 $data['csstidy']['all_properties']['marquee-loop'] = 'CSS3.0'; 442 $data['csstidy']['all_properties']['marquee-play-count'] = 'CSS3.0'; 443 $data['csstidy']['all_properties']['marquee-speed'] = 'CSS3.0'; 444 $data['csstidy']['all_properties']['marquee-style'] = 'CSS3.0'; 445 $data['csstidy']['all_properties']['max-height'] = 'CSS2.0,CSS2.1,CSS3.0'; 446 $data['csstidy']['all_properties']['max-width'] = 'CSS2.0,CSS2.1,CSS3.0'; 447 $data['csstidy']['all_properties']['min-height'] = 'CSS2.0,CSS2.1,CSS3.0'; 448 $data['csstidy']['all_properties']['min-width'] = 'CSS2.0,CSS2.1,CSS3.0'; 449 $data['csstidy']['all_properties']['move-to'] = 'CSS3.0'; 450 $data['csstidy']['all_properties']['nav-down'] = 'CSS3.0'; 451 $data['csstidy']['all_properties']['nav-index'] = 'CSS3.0'; 452 $data['csstidy']['all_properties']['nav-left'] = 'CSS3.0'; 453 $data['csstidy']['all_properties']['nav-right'] = 'CSS3.0'; 454 $data['csstidy']['all_properties']['nav-up'] = 'CSS3.0'; 455 $data['csstidy']['all_properties']['opacity'] = 'CSS3.0'; 456 $data['csstidy']['all_properties']['orphans'] = 'CSS2.0,CSS2.1,CSS3.0'; 457 $data['csstidy']['all_properties']['outline'] = 'CSS2.0,CSS2.1,CSS3.0'; 458 $data['csstidy']['all_properties']['outline-color'] = 'CSS2.0,CSS2.1,CSS3.0'; 459 $data['csstidy']['all_properties']['outline-offset'] = 'CSS3.0'; 460 $data['csstidy']['all_properties']['outline-style'] = 'CSS2.0,CSS2.1,CSS3.0'; 461 $data['csstidy']['all_properties']['outline-width'] = 'CSS2.0,CSS2.1,CSS3.0'; 462 $data['csstidy']['all_properties']['overflow'] = 'CSS2.0,CSS2.1,CSS3.0'; 463 $data['csstidy']['all_properties']['overflow-style'] = 'CSS3.0'; 464 $data['csstidy']['all_properties']['overflow-wrap'] = 'CSS3.0'; 465 $data['csstidy']['all_properties']['overflow-x'] = 'CSS3.0'; 466 $data['csstidy']['all_properties']['overflow-y'] = 'CSS3.0'; 467 $data['csstidy']['all_properties']['padding'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0'; 468 $data['csstidy']['all_properties']['padding-bottom'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0'; 469 $data['csstidy']['all_properties']['padding-left'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0'; 470 $data['csstidy']['all_properties']['padding-right'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0'; 471 $data['csstidy']['all_properties']['padding-top'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0'; 472 $data['csstidy']['all_properties']['page'] = 'CSS2.0,CSS3.0'; 473 $data['csstidy']['all_properties']['page-break-after'] = 'CSS2.0,CSS2.1,CSS3.0'; 474 $data['csstidy']['all_properties']['page-break-before'] = 'CSS2.0,CSS2.1,CSS3.0'; 475 $data['csstidy']['all_properties']['page-break-inside'] = 'CSS2.0,CSS2.1,CSS3.0'; 476 $data['csstidy']['all_properties']['page-policy'] = 'CSS3.0'; 477 $data['csstidy']['all_properties']['pause'] = 'CSS2.0,CSS2.1,CSS3.0'; 478 $data['csstidy']['all_properties']['pause-after'] = 'CSS2.0,CSS2.1,CSS3.0'; 479 $data['csstidy']['all_properties']['pause-before'] = 'CSS2.0,CSS2.1,CSS3.0'; 480 $data['csstidy']['all_properties']['perspective'] = 'CSS3.0'; 481 $data['csstidy']['all_properties']['perspective-origin'] = 'CSS3.0'; 482 $data['csstidy']['all_properties']['phonemes'] = 'CSS3.0'; 483 $data['csstidy']['all_properties']['pitch'] = 'CSS2.0,CSS2.1,CSS3.0'; 484 $data['csstidy']['all_properties']['pitch-range'] = 'CSS2.0,CSS2.1,CSS3.0'; 485 $data['csstidy']['all_properties']['play-during'] = 'CSS2.0,CSS2.1,CSS3.0'; 486 $data['csstidy']['all_properties']['position'] = 'CSS2.0,CSS2.1,CSS3.0'; 487 $data['csstidy']['all_properties']['presentation-level'] = 'CSS3.0'; 488 $data['csstidy']['all_properties']['punctuation-trim'] = 'CSS3.0'; 489 $data['csstidy']['all_properties']['quotes'] = 'CSS2.0,CSS2.1,CSS3.0'; 490 $data['csstidy']['all_properties']['rendering-intent'] = 'CSS3.0'; 491 $data['csstidy']['all_properties']['resize'] = 'CSS3.0'; 492 $data['csstidy']['all_properties']['rest'] = 'CSS3.0'; 493 $data['csstidy']['all_properties']['rest-after'] = 'CSS3.0'; 494 $data['csstidy']['all_properties']['rest-before'] = 'CSS3.0'; 495 $data['csstidy']['all_properties']['richness'] = 'CSS2.0,CSS2.1,CSS3.0'; 496 $data['csstidy']['all_properties']['right'] = 'CSS2.0,CSS2.1,CSS3.0'; 497 $data['csstidy']['all_properties']['rotation'] = 'CSS3.0'; 498 $data['csstidy']['all_properties']['rotation-point'] = 'CSS3.0'; 499 $data['csstidy']['all_properties']['ruby-align'] = 'CSS3.0'; 500 $data['csstidy']['all_properties']['ruby-overhang'] = 'CSS3.0'; 501 $data['csstidy']['all_properties']['ruby-position'] = 'CSS3.0'; 502 $data['csstidy']['all_properties']['ruby-span'] = 'CSS3.0'; 503 $data['csstidy']['all_properties']['size'] = 'CSS2.0,CSS3.0'; 504 $data['csstidy']['all_properties']['speak'] = 'CSS2.0,CSS2.1,CSS3.0'; 505 $data['csstidy']['all_properties']['speak-header'] = 'CSS2.0,CSS2.1,CSS3.0'; 506 $data['csstidy']['all_properties']['speak-numeral'] = 'CSS2.0,CSS2.1,CSS3.0'; 507 $data['csstidy']['all_properties']['speak-punctuation'] = 'CSS2.0,CSS2.1,CSS3.0'; 508 $data['csstidy']['all_properties']['speech-rate'] = 'CSS2.0,CSS2.1,CSS3.0'; 509 $data['csstidy']['all_properties']['src'] = 'CSS3.0'; 510 $data['csstidy']['all_properties']['stress'] = 'CSS2.0,CSS2.1,CSS3.0'; 511 $data['csstidy']['all_properties']['string-set'] = 'CSS3.0'; 512 $data['csstidy']['all_properties']['tab-size'] = 'CSS3.0'; 513 $data['csstidy']['all_properties']['table-layout'] = 'CSS2.0,CSS2.1,CSS3.0'; 514 $data['csstidy']['all_properties']['target'] = 'CSS3.0'; 515 $data['csstidy']['all_properties']['target-name'] = 'CSS3.0'; 516 $data['csstidy']['all_properties']['target-new'] = 'CSS3.0'; 517 $data['csstidy']['all_properties']['target-position'] = 'CSS3.0'; 518 $data['csstidy']['all_properties']['text-align'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0'; 519 $data['csstidy']['all_properties']['text-align-last'] = 'CSS3.0'; 520 $data['csstidy']['all_properties']['text-decoration'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0'; 521 $data['csstidy']['all_properties']['text-decoration-color'] = 'CSS3.0'; 522 $data['csstidy']['all_properties']['text-decoration-line'] = 'CSS3.0'; 523 $data['csstidy']['all_properties']['text-decoration-skip'] = 'CSS3.0'; 524 $data['csstidy']['all_properties']['text-decoration-style'] = 'CSS3.0'; 525 $data['csstidy']['all_properties']['text-emphasis'] = 'CSS3.0'; 526 $data['csstidy']['all_properties']['text-emphasis-color'] = 'CSS3.0'; 527 $data['csstidy']['all_properties']['text-emphasis-position'] = 'CSS3.0'; 528 $data['csstidy']['all_properties']['text-emphasis-style'] = 'CSS3.0'; 529 $data['csstidy']['all_properties']['text-height'] = 'CSS3.0'; 530 $data['csstidy']['all_properties']['text-indent'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0'; 531 $data['csstidy']['all_properties']['text-justify'] = 'CSS3.0'; 532 $data['csstidy']['all_properties']['text-outline'] = 'CSS3.0'; 533 $data['csstidy']['all_properties']['text-shadow'] = 'CSS2.0,CSS3.0'; 534 $data['csstidy']['all_properties']['text-space-collapse'] = 'CSS3.0'; 535 $data['csstidy']['all_properties']['text-transform'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0'; 536 $data['csstidy']['all_properties']['text-underline-position'] = 'CSS3.0'; 537 $data['csstidy']['all_properties']['text-wrap'] = 'CSS3.0'; 538 $data['csstidy']['all_properties']['top'] = 'CSS2.0,CSS2.1,CSS3.0'; 539 $data['csstidy']['all_properties']['transform'] = 'CSS3.0'; 540 $data['csstidy']['all_properties']['transform-origin'] = 'CSS3.0'; 541 $data['csstidy']['all_properties']['transform-style'] = 'CSS3.0'; 542 $data['csstidy']['all_properties']['transition'] = 'CSS3.0'; 543 $data['csstidy']['all_properties']['transition-delay'] = 'CSS3.0'; 544 $data['csstidy']['all_properties']['transition-duration'] = 'CSS3.0'; 545 $data['csstidy']['all_properties']['transition-property'] = 'CSS3.0'; 546 $data['csstidy']['all_properties']['transition-timing-function'] = 'CSS3.0'; 547 $data['csstidy']['all_properties']['unicode-bidi'] = 'CSS2.0,CSS2.1,CSS3.0'; 548 $data['csstidy']['all_properties']['vertical-align'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0'; 549 $data['csstidy']['all_properties']['visibility'] = 'CSS2.0,CSS2.1,CSS3.0'; 550 $data['csstidy']['all_properties']['voice-balance'] = 'CSS3.0'; 551 $data['csstidy']['all_properties']['voice-duration'] = 'CSS3.0'; 552 $data['csstidy']['all_properties']['voice-family'] = 'CSS2.0,CSS2.1,CSS3.0'; 553 $data['csstidy']['all_properties']['voice-pitch'] = 'CSS3.0'; 554 $data['csstidy']['all_properties']['voice-pitch-range'] = 'CSS3.0'; 555 $data['csstidy']['all_properties']['voice-rate'] = 'CSS3.0'; 556 $data['csstidy']['all_properties']['voice-stress'] = 'CSS3.0'; 557 $data['csstidy']['all_properties']['voice-volume'] = 'CSS3.0'; 558 $data['csstidy']['all_properties']['volume'] = 'CSS2.0,CSS2.1,CSS3.0'; 559 $data['csstidy']['all_properties']['white-space'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0'; 560 $data['csstidy']['all_properties']['widows'] = 'CSS2.0,CSS2.1,CSS3.0'; 561 $data['csstidy']['all_properties']['width'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0'; 562 $data['csstidy']['all_properties']['word-break'] = 'CSS3.0'; 563 $data['csstidy']['all_properties']['word-spacing'] = 'CSS1.0,CSS2.0,CSS2.1,CSS3.0'; 564 $data['csstidy']['all_properties']['word-wrap'] = 'CSS3.0'; 565 $data['csstidy']['all_properties']['z-index'] = 'CSS2.0,CSS2.1,CSS3.0'; 576 566 577 567 /** 578 568 * An array containing all properties that can accept a quoted string as a value. 579 569 * 580 * @global array $ GLOBALS['csstidy']['quoted_string_properties']581 */ 582 $ GLOBALS['csstidy']['quoted_string_properties'] = array('content', 'font-family', 'quotes');570 * @global array $data['csstidy']['quoted_string_properties'] 571 */ 572 $data['csstidy']['quoted_string_properties'] = array('content', 'font-family', 'quotes'); 583 573 584 574 /** 585 575 * An array containing all properties that can be defined multiple times without being overwritten. 586 576 * 587 * @global array $ GLOBALS['csstidy']['quoted_string_properties']588 */ 589 $ GLOBALS['csstidy']['multiple_properties'] = array('background', 'background-image');577 * @global array $data['csstidy']['quoted_string_properties'] 578 */ 579 $data['csstidy']['multiple_properties'] = array('background', 'background-image'); 590 580 591 581 /** 592 582 * An array containing all predefined templates. 593 583 * 594 * @global array $ GLOBALS['csstidy']['predefined_templates']584 * @global array $data['csstidy']['predefined_templates'] 595 585 * @version 1.0 596 586 * @see csstidy::load_template() 597 587 */ 598 $ GLOBALS['csstidy']['predefined_templates']['default'][] = '<span class="at">'; //string before @rule599 $ GLOBALS['csstidy']['predefined_templates']['default'][] = '</span> <span class="format">{</span>'."\n"; //bracket after @-rule600 $ GLOBALS['csstidy']['predefined_templates']['default'][] = '<span class="selector">'; //string before selector601 $ GLOBALS['csstidy']['predefined_templates']['default'][] = '</span> <span class="format">{</span>'."\n"; //bracket after selector602 $ GLOBALS['csstidy']['predefined_templates']['default'][] = '<span class="property">'; //string before property603 $ GLOBALS['csstidy']['predefined_templates']['default'][] = '</span><span class="value">'; //string after property+before value604 $ GLOBALS['csstidy']['predefined_templates']['default'][] = '</span><span class="format">;</span>'."\n"; //string after value605 $ GLOBALS['csstidy']['predefined_templates']['default'][] = '<span class="format">}</span>'; //closing bracket - selector606 $ GLOBALS['csstidy']['predefined_templates']['default'][] = "\n\n"; //space between blocks {...}607 $ GLOBALS['csstidy']['predefined_templates']['default'][] = "\n".'<span class="format">}</span>'. "\n\n"; //closing bracket @-rule608 $ GLOBALS['csstidy']['predefined_templates']['default'][] = ''; //indent in @-rule609 $ GLOBALS['csstidy']['predefined_templates']['default'][] = '<span class="comment">'; // before comment610 $ GLOBALS['csstidy']['predefined_templates']['default'][] = '</span>'."\n"; // after comment611 $ GLOBALS['csstidy']['predefined_templates']['default'][] = "\n"; // after each line @-rule612 613 $ GLOBALS['csstidy']['predefined_templates']['high_compression'][] = '<span class="at">';614 $ GLOBALS['csstidy']['predefined_templates']['high_compression'][] = '</span> <span class="format">{</span>'."\n";615 $ GLOBALS['csstidy']['predefined_templates']['high_compression'][] = '<span class="selector">';616 $ GLOBALS['csstidy']['predefined_templates']['high_compression'][] = '</span><span class="format">{</span>';617 $ GLOBALS['csstidy']['predefined_templates']['high_compression'][] = '<span class="property">';618 $ GLOBALS['csstidy']['predefined_templates']['high_compression'][] = '</span><span class="value">';619 $ GLOBALS['csstidy']['predefined_templates']['high_compression'][] = '</span><span class="format">;</span>';620 $ GLOBALS['csstidy']['predefined_templates']['high_compression'][] = '<span class="format">}</span>';621 $ GLOBALS['csstidy']['predefined_templates']['high_compression'][] = "\n";622 $ GLOBALS['csstidy']['predefined_templates']['high_compression'][] = "\n". '<span class="format">}'."\n".'</span>';623 $ GLOBALS['csstidy']['predefined_templates']['high_compression'][] = '';624 $ GLOBALS['csstidy']['predefined_templates']['high_compression'][] = '<span class="comment">'; // before comment625 $ GLOBALS['csstidy']['predefined_templates']['high_compression'][] = '</span>'; // after comment626 $ GLOBALS['csstidy']['predefined_templates']['high_compression'][] = "\n";627 628 $ GLOBALS['csstidy']['predefined_templates']['highest_compression'][] = '<span class="at">';629 $ GLOBALS['csstidy']['predefined_templates']['highest_compression'][] = '</span><span class="format">{</span>';630 $ GLOBALS['csstidy']['predefined_templates']['highest_compression'][] = '<span class="selector">';631 $ GLOBALS['csstidy']['predefined_templates']['highest_compression'][] = '</span><span class="format">{</span>';632 $ GLOBALS['csstidy']['predefined_templates']['highest_compression'][] = '<span class="property">';633 $ GLOBALS['csstidy']['predefined_templates']['highest_compression'][] = '</span><span class="value">';634 $ GLOBALS['csstidy']['predefined_templates']['highest_compression'][] = '</span><span class="format">;</span>';635 $ GLOBALS['csstidy']['predefined_templates']['highest_compression'][] = '<span class="format">}</span>';636 $ GLOBALS['csstidy']['predefined_templates']['highest_compression'][] = '';637 $ GLOBALS['csstidy']['predefined_templates']['highest_compression'][] = '<span class="format">}</span>';638 $ GLOBALS['csstidy']['predefined_templates']['highest_compression'][] = '';639 $ GLOBALS['csstidy']['predefined_templates']['highest_compression'][] = '<span class="comment">'; // before comment640 $ GLOBALS['csstidy']['predefined_templates']['highest_compression'][] = '</span>'; // after comment641 $ GLOBALS['csstidy']['predefined_templates']['highest_compression'][] = '';642 643 $ GLOBALS['csstidy']['predefined_templates']['low_compression'][] = '<span class="at">';644 $ GLOBALS['csstidy']['predefined_templates']['low_compression'][] = '</span> <span class="format">{</span>'."\n";645 $ GLOBALS['csstidy']['predefined_templates']['low_compression'][] = '<span class="selector">';646 $ GLOBALS['csstidy']['predefined_templates']['low_compression'][] = '</span>'."\n".'<span class="format">{</span>'."\n";647 $ GLOBALS['csstidy']['predefined_templates']['low_compression'][] = ' <span class="property">';648 $ GLOBALS['csstidy']['predefined_templates']['low_compression'][] = '</span><span class="value">';649 $ GLOBALS['csstidy']['predefined_templates']['low_compression'][] = '</span><span class="format">;</span>'."\n";650 $ GLOBALS['csstidy']['predefined_templates']['low_compression'][] = '<span class="format">}</span>';651 $ GLOBALS['csstidy']['predefined_templates']['low_compression'][] = "\n\n";652 $ GLOBALS['csstidy']['predefined_templates']['low_compression'][] = "\n".'<span class="format">}</span>'."\n\n";653 $ GLOBALS['csstidy']['predefined_templates']['low_compression'][] = ' ';654 $ GLOBALS['csstidy']['predefined_templates']['low_compression'][] = '<span class="comment">'; // before comment655 $ GLOBALS['csstidy']['predefined_templates']['low_compression'][] = '</span>'."\n"; // after comment656 $ GLOBALS['csstidy']['predefined_templates']['low_compression'][] = "\n";588 $data['csstidy']['predefined_templates']['default'][] = '<span class="at">'; //string before @rule 589 $data['csstidy']['predefined_templates']['default'][] = '</span> <span class="format">{</span>'."\n"; //bracket after @-rule 590 $data['csstidy']['predefined_templates']['default'][] = '<span class="selector">'; //string before selector 591 $data['csstidy']['predefined_templates']['default'][] = '</span> <span class="format">{</span>'."\n"; //bracket after selector 592 $data['csstidy']['predefined_templates']['default'][] = '<span class="property">'; //string before property 593 $data['csstidy']['predefined_templates']['default'][] = '</span><span class="value">'; //string after property+before value 594 $data['csstidy']['predefined_templates']['default'][] = '</span><span class="format">;</span>'."\n"; //string after value 595 $data['csstidy']['predefined_templates']['default'][] = '<span class="format">}</span>'; //closing bracket - selector 596 $data['csstidy']['predefined_templates']['default'][] = "\n\n"; //space between blocks {...} 597 $data['csstidy']['predefined_templates']['default'][] = "\n".'<span class="format">}</span>'. "\n\n"; //closing bracket @-rule 598 $data['csstidy']['predefined_templates']['default'][] = ''; //indent in @-rule 599 $data['csstidy']['predefined_templates']['default'][] = '<span class="comment">'; // before comment 600 $data['csstidy']['predefined_templates']['default'][] = '</span>'."\n"; // after comment 601 $data['csstidy']['predefined_templates']['default'][] = "\n"; // after each line @-rule 602 603 $data['csstidy']['predefined_templates']['high_compression'][] = '<span class="at">'; 604 $data['csstidy']['predefined_templates']['high_compression'][] = '</span> <span class="format">{</span>'."\n"; 605 $data['csstidy']['predefined_templates']['high_compression'][] = '<span class="selector">'; 606 $data['csstidy']['predefined_templates']['high_compression'][] = '</span><span class="format">{</span>'; 607 $data['csstidy']['predefined_templates']['high_compression'][] = '<span class="property">'; 608 $data['csstidy']['predefined_templates']['high_compression'][] = '</span><span class="value">'; 609 $data['csstidy']['predefined_templates']['high_compression'][] = '</span><span class="format">;</span>'; 610 $data['csstidy']['predefined_templates']['high_compression'][] = '<span class="format">}</span>'; 611 $data['csstidy']['predefined_templates']['high_compression'][] = "\n"; 612 $data['csstidy']['predefined_templates']['high_compression'][] = "\n". '<span class="format">}'."\n".'</span>'; 613 $data['csstidy']['predefined_templates']['high_compression'][] = ''; 614 $data['csstidy']['predefined_templates']['high_compression'][] = '<span class="comment">'; // before comment 615 $data['csstidy']['predefined_templates']['high_compression'][] = '</span>'; // after comment 616 $data['csstidy']['predefined_templates']['high_compression'][] = "\n"; 617 618 $data['csstidy']['predefined_templates']['highest_compression'][] = '<span class="at">'; 619 $data['csstidy']['predefined_templates']['highest_compression'][] = '</span><span class="format">{</span>'; 620 $data['csstidy']['predefined_templates']['highest_compression'][] = '<span class="selector">'; 621 $data['csstidy']['predefined_templates']['highest_compression'][] = '</span><span class="format">{</span>'; 622 $data['csstidy']['predefined_templates']['highest_compression'][] = '<span class="property">'; 623 $data['csstidy']['predefined_templates']['highest_compression'][] = '</span><span class="value">'; 624 $data['csstidy']['predefined_templates']['highest_compression'][] = '</span><span class="format">;</span>'; 625 $data['csstidy']['predefined_templates']['highest_compression'][] = '<span class="format">}</span>'; 626 $data['csstidy']['predefined_templates']['highest_compression'][] = ''; 627 $data['csstidy']['predefined_templates']['highest_compression'][] = '<span class="format">}</span>'; 628 $data['csstidy']['predefined_templates']['highest_compression'][] = ''; 629 $data['csstidy']['predefined_templates']['highest_compression'][] = '<span class="comment">'; // before comment 630 $data['csstidy']['predefined_templates']['highest_compression'][] = '</span>'; // after comment 631 $data['csstidy']['predefined_templates']['highest_compression'][] = ''; 632 633 $data['csstidy']['predefined_templates']['low_compression'][] = '<span class="at">'; 634 $data['csstidy']['predefined_templates']['low_compression'][] = '</span> <span class="format">{</span>'."\n"; 635 $data['csstidy']['predefined_templates']['low_compression'][] = '<span class="selector">'; 636 $data['csstidy']['predefined_templates']['low_compression'][] = '</span>'."\n".'<span class="format">{</span>'."\n"; 637 $data['csstidy']['predefined_templates']['low_compression'][] = ' <span class="property">'; 638 $data['csstidy']['predefined_templates']['low_compression'][] = '</span><span class="value">'; 639 $data['csstidy']['predefined_templates']['low_compression'][] = '</span><span class="format">;</span>'."\n"; 640 $data['csstidy']['predefined_templates']['low_compression'][] = '<span class="format">}</span>'; 641 $data['csstidy']['predefined_templates']['low_compression'][] = "\n\n"; 642 $data['csstidy']['predefined_templates']['low_compression'][] = "\n".'<span class="format">}</span>'."\n\n"; 643 $data['csstidy']['predefined_templates']['low_compression'][] = ' '; 644 $data['csstidy']['predefined_templates']['low_compression'][] = '<span class="comment">'; // before comment 645 $data['csstidy']['predefined_templates']['low_compression'][] = '</span>'."\n"; // after comment 646 $data['csstidy']['predefined_templates']['low_compression'][] = "\n"; -
_core_/branches/spip-3.0/plugins/compresseur/paquet.xml
r78509 r81332 2 2 prefix="compresseur" 3 3 categorie="performance" 4 version="1.8. 7"4 version="1.8.8" 5 5 etat="stable" 6 6 compatibilite="[3.0.0;3.1.*]"
Note: See TracChangeset
for help on using the changeset viewer.