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