summaryrefslogtreecommitdiff
blob: c6427bbd73e023e9cc56df361116fd9f7dab4846 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<?php

unset( $GLOBALS['csstidy']['all_properties']['binding'] );

$GLOBALS['csstidy']['all_properties']['text-size-adjust'] = 'CSS3.0';

// Support browser prefixes for properties only in the latest CSS draft
foreach ( $GLOBALS['csstidy']['all_properties'] as $property => $levels ) {
	if ( strpos( $levels, "," ) === false ) {
		$GLOBALS['csstidy']['all_properties']['-moz-' . $property] = $levels;
		$GLOBALS['csstidy']['all_properties']['-webkit-' . $property] = $levels;
		$GLOBALS['csstidy']['all_properties']['-ms-' . $property] = $levels;
		$GLOBALS['csstidy']['all_properties']['-o-' . $property] = $levels;
		$GLOBALS['csstidy']['all_properties']['-khtml-' . $property] = $levels;

		if ( in_array( $property, $GLOBALS['csstidy']['unit_values'] ) ) {
			$GLOBALS['csstidy']['unit_values'][] = '-moz-' . $property;
			$GLOBALS['csstidy']['unit_values'][] = '-webkit-' . $property;
			$GLOBALS['csstidy']['unit_values'][] = '-ms-' . $property;
			$GLOBALS['csstidy']['unit_values'][] = '-o-' . $property;
			$GLOBALS['csstidy']['unit_values'][] = '-khtml-' . $property;
		}

		if ( in_array( $property, $GLOBALS['csstidy']['color_values'] ) ) {
			$GLOBALS['csstidy']['color_values'][] = '-moz-' . $property;
			$GLOBALS['csstidy']['color_values'][] = '-webkit-' . $property;
			$GLOBALS['csstidy']['color_values'][] = '-ms-' . $property;
			$GLOBALS['csstidy']['color_values'][] = '-o-' . $property;
			$GLOBALS['csstidy']['color_values'][] = '-khtml-' . $property;
		}
	}
}

// Add `display` to the list of properties that can be used multiple times in a single selector
$GLOBALS['csstidy']['multiple_properties'][] = 'display';

// Allow vendor prefixes for any property that is allowed to be used multiple times inside a single selector
foreach ( $GLOBALS['csstidy']['multiple_properties'] as $property ) {
	if ( '-' != $property[0] ) {
		$GLOBALS['csstidy']['multiple_properties'][] = '-o-' . $property;
		$GLOBALS['csstidy']['multiple_properties'][] = '-ms-' . $property;
		$GLOBALS['csstidy']['multiple_properties'][] = '-webkit-' . $property;
		$GLOBALS['csstidy']['multiple_properties'][] = '-moz-' . $property;
		$GLOBALS['csstidy']['multiple_properties'][] = '-khtml-' . $property;
	}
}

/**
 * CSS Animation
 *
 * @see https://developer.mozilla.org/en/CSS/CSS_animations
 */
$GLOBALS['csstidy']['at_rules']['-webkit-keyframes'] = 'at';
$GLOBALS['csstidy']['at_rules']['-moz-keyframes'] = 'at';
$GLOBALS['csstidy']['at_rules']['-ms-keyframes'] = 'at';
$GLOBALS['csstidy']['at_rules']['-o-keyframes'] = 'at';

/**
 * Non-standard viewport rule.
 */
$GLOBALS['csstidy']['at_rules']['viewport'] = 'is';
$GLOBALS['csstidy']['at_rules']['-webkit-viewport'] = 'is';
$GLOBALS['csstidy']['at_rules']['-moz-viewport'] = 'is';
$GLOBALS['csstidy']['at_rules']['-ms-viewport'] = 'is';

/**
 * Non-standard CSS properties.  They're not part of any spec, but we say
 * they're in all of them so that we can support them.
 */
$GLOBALS['csstidy']['all_properties']['-webkit-filter'] = 'CSS2.0,CSS2.1,CSS3.0';
$GLOBALS['csstidy']['all_properties']['-moz-filter'] = 'CSS2.0,CSS2.1,CSS3.0';
$GLOBALS['csstidy']['all_properties']['-ms-filter'] = 'CSS2.0,CSS2.1,CSS3.0';
$GLOBALS['csstidy']['all_properties']['filter'] = 'CSS2.0,CSS2.1,CSS3.0';
$GLOBALS['csstidy']['all_properties']['scrollbar-face-color'] = 'CSS2.0,CSS2.1,CSS3.0';
$GLOBALS['csstidy']['all_properties']['-ms-interpolation-mode'] = 'CSS2.0,CSS2.1,CSS3.0';
$GLOBALS['csstidy']['all_properties']['text-rendering'] = 'CSS2.0,CSS2.1,CSS3.0';
$GLOBALS['csstidy']['all_properties']['-webkit-transform-origin-x'] = 'CSS3.0';
$GLOBALS['csstidy']['all_properties']['-webkit-transform-origin-y'] = 'CSS3.0';
$GLOBALS['csstidy']['all_properties']['-webkit-transform-origin-z'] = 'CSS3.0';
$GLOBALS['csstidy']['all_properties']['-webkit-font-smoothing'] = 'CSS3.0';
$GLOBALS['csstidy']['all_properties']['-moz-osx-font-smoothing'] = 'CSS3.0';
$GLOBALS['csstidy']['all_properties']['-font-smooth'] = 'CSS3.0';
$GLOBALS['csstidy']['all_properties']['-o-object-fit'] = 'CSS3.0';
$GLOBALS['csstidy']['all_properties']['object-fit'] = 'CSS3.0';
$GLOBALS['csstidy']['all_properties']['-o-object-position'] = 'CSS3.0';
$GLOBALS['csstidy']['all_properties']['object-position'] = 'CSS3.0';
$GLOBALS['csstidy']['all_properties']['text-overflow'] = 'CSS3.0';
$GLOBALS['csstidy']['all_properties']['zoom'] = 'CSS3.0';
$GLOBALS['csstidy']['all_properties']['pointer-events'] = 'CSS3.0';