data-wp.inc.php 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. <?php
  2. unset( $GLOBALS['csstidy']['all_properties']['binding'] );
  3. $GLOBALS['csstidy']['all_properties']['text-size-adjust'] = 'CSS3.0';
  4. // Support browser prefixes for properties only in the latest CSS draft
  5. foreach ( $GLOBALS['csstidy']['all_properties'] as $property => $levels ) {
  6. if ( strpos( $levels, "," ) === false ) {
  7. $GLOBALS['csstidy']['all_properties']['-moz-' . $property] = $levels;
  8. $GLOBALS['csstidy']['all_properties']['-webkit-' . $property] = $levels;
  9. $GLOBALS['csstidy']['all_properties']['-ms-' . $property] = $levels;
  10. $GLOBALS['csstidy']['all_properties']['-o-' . $property] = $levels;
  11. $GLOBALS['csstidy']['all_properties']['-khtml-' . $property] = $levels;
  12. if ( in_array( $property, $GLOBALS['csstidy']['unit_values'] ) ) {
  13. $GLOBALS['csstidy']['unit_values'][] = '-moz-' . $property;
  14. $GLOBALS['csstidy']['unit_values'][] = '-webkit-' . $property;
  15. $GLOBALS['csstidy']['unit_values'][] = '-ms-' . $property;
  16. $GLOBALS['csstidy']['unit_values'][] = '-o-' . $property;
  17. $GLOBALS['csstidy']['unit_values'][] = '-khtml-' . $property;
  18. }
  19. if ( in_array( $property, $GLOBALS['csstidy']['color_values'] ) ) {
  20. $GLOBALS['csstidy']['color_values'][] = '-moz-' . $property;
  21. $GLOBALS['csstidy']['color_values'][] = '-webkit-' . $property;
  22. $GLOBALS['csstidy']['color_values'][] = '-ms-' . $property;
  23. $GLOBALS['csstidy']['color_values'][] = '-o-' . $property;
  24. $GLOBALS['csstidy']['color_values'][] = '-khtml-' . $property;
  25. }
  26. }
  27. }
  28. // Add `display` to the list of properties that can be used multiple times in a single selector
  29. $GLOBALS['csstidy']['multiple_properties'][] = 'display';
  30. // Allow vendor prefixes for any property that is allowed to be used multiple times inside a single selector
  31. foreach ( $GLOBALS['csstidy']['multiple_properties'] as $property ) {
  32. if ( '-' != $property[0] ) {
  33. $GLOBALS['csstidy']['multiple_properties'][] = '-o-' . $property;
  34. $GLOBALS['csstidy']['multiple_properties'][] = '-ms-' . $property;
  35. $GLOBALS['csstidy']['multiple_properties'][] = '-webkit-' . $property;
  36. $GLOBALS['csstidy']['multiple_properties'][] = '-moz-' . $property;
  37. $GLOBALS['csstidy']['multiple_properties'][] = '-khtml-' . $property;
  38. }
  39. }
  40. /**
  41. * CSS Animation
  42. *
  43. * @see https://developer.mozilla.org/en/CSS/CSS_animations
  44. */
  45. $GLOBALS['csstidy']['at_rules']['-webkit-keyframes'] = 'at';
  46. $GLOBALS['csstidy']['at_rules']['-moz-keyframes'] = 'at';
  47. $GLOBALS['csstidy']['at_rules']['-ms-keyframes'] = 'at';
  48. $GLOBALS['csstidy']['at_rules']['-o-keyframes'] = 'at';
  49. /**
  50. * Non-standard viewport rule.
  51. */
  52. $GLOBALS['csstidy']['at_rules']['viewport'] = 'is';
  53. $GLOBALS['csstidy']['at_rules']['-webkit-viewport'] = 'is';
  54. $GLOBALS['csstidy']['at_rules']['-moz-viewport'] = 'is';
  55. $GLOBALS['csstidy']['at_rules']['-ms-viewport'] = 'is';
  56. /**
  57. * Non-standard CSS properties. They're not part of any spec, but we say
  58. * they're in all of them so that we can support them.
  59. */
  60. $GLOBALS['csstidy']['all_properties']['-webkit-filter'] = 'CSS2.0,CSS2.1,CSS3.0';
  61. $GLOBALS['csstidy']['all_properties']['-moz-filter'] = 'CSS2.0,CSS2.1,CSS3.0';
  62. $GLOBALS['csstidy']['all_properties']['-ms-filter'] = 'CSS2.0,CSS2.1,CSS3.0';
  63. $GLOBALS['csstidy']['all_properties']['filter'] = 'CSS2.0,CSS2.1,CSS3.0';
  64. $GLOBALS['csstidy']['all_properties']['scrollbar-face-color'] = 'CSS2.0,CSS2.1,CSS3.0';
  65. $GLOBALS['csstidy']['all_properties']['-ms-interpolation-mode'] = 'CSS2.0,CSS2.1,CSS3.0';
  66. $GLOBALS['csstidy']['all_properties']['text-rendering'] = 'CSS2.0,CSS2.1,CSS3.0';
  67. $GLOBALS['csstidy']['all_properties']['-webkit-transform-origin-x'] = 'CSS3.0';
  68. $GLOBALS['csstidy']['all_properties']['-webkit-transform-origin-y'] = 'CSS3.0';
  69. $GLOBALS['csstidy']['all_properties']['-webkit-transform-origin-z'] = 'CSS3.0';
  70. $GLOBALS['csstidy']['all_properties']['-webkit-font-smoothing'] = 'CSS3.0';
  71. $GLOBALS['csstidy']['all_properties']['-moz-osx-font-smoothing'] = 'CSS3.0';
  72. $GLOBALS['csstidy']['all_properties']['-font-smooth'] = 'CSS3.0';
  73. $GLOBALS['csstidy']['all_properties']['-o-object-fit'] = 'CSS3.0';
  74. $GLOBALS['csstidy']['all_properties']['object-fit'] = 'CSS3.0';
  75. $GLOBALS['csstidy']['all_properties']['-o-object-position'] = 'CSS3.0';
  76. $GLOBALS['csstidy']['all_properties']['object-position'] = 'CSS3.0';
  77. $GLOBALS['csstidy']['all_properties']['text-overflow'] = 'CSS3.0';
  78. $GLOBALS['csstidy']['all_properties']['zoom'] = 'CSS3.0';
  79. $GLOBALS['csstidy']['all_properties']['pointer-events'] = 'CSS3.0';
  80. $GLOBALS['csstidy']['all_properties']['font-feature-settings'] = 'CSS3.0';
  81. $GLOBALS['csstidy']['all_properties']['font-kerning'] = 'CSS3.0';
  82. $GLOBALS['csstidy']['all_properties']['font-language-override'] = 'CSS3.0';
  83. $GLOBALS['csstidy']['all_properties']['font-synthesis'] = 'CSS3.0';
  84. $GLOBALS['csstidy']['all_properties']['font-variant-alternates'] = 'CSS3.0';
  85. $GLOBALS['csstidy']['all_properties']['font-variant-caps'] = 'CSS3.0';
  86. $GLOBALS['csstidy']['all_properties']['font-variant-east-asian'] = 'CSS3.0';
  87. $GLOBALS['csstidy']['all_properties']['font-variant-ligatures'] = 'CSS3.0';
  88. $GLOBALS['csstidy']['all_properties']['font-variant-numeric'] = 'CSS3.0';
  89. $GLOBALS['csstidy']['all_properties']['font-variant-position'] = 'CSS3.0';
  90. $GLOBALS['csstidy']['all_properties']['font-variation-settings'] = 'CSS3.0';
  91. $GLOBALS['csstidy']['all_properties']['line-height-step'] = 'CSS3.0';