src/CSSJanus.php
private static function fixBackgroundPosition($css) {
		$replaced = preg_replace_callback(
			self::$patterns['bg_horizontal_percentage'],
			array('self', 'calculateNewBackgroundPosition'),
			$css
		);
		if ($replaced !== null) {
			// preg_replace_callback() sometimes returns null
			$css = $replaced;
		}
		$replaced = preg_replace_callback(
			self::$patterns['bg_horizontal_percentage_x'],
			array('self', 'calculateNewBackgroundPosition'),
			$css
		);
		if ($replaced !== null) {
			$css = $replaced;
		}

		return $css;
	}
private static function fixBackgroundPosition($css) {
		$replaced = preg_replace_callback(
			self::$patterns['bg_horizontal_percentage'],
			array('self', 'calculateNewBackgroundPosition'),
			$css
		);
		if ($replaced !== null) {
			// preg_replace_callback() sometimes returns null
			$css = $replaced;
		}
		$replaced = preg_replace_callback(
			self::$patterns['bg_horizontal_percentage_x'],
			array('self', 'calculateNewBackgroundPosition'),
			$css
		);
		if ($replaced !== null) {
			$css = $replaced;
		}

		return $css;
	}
private static function fixBackgroundPosition ( $ css ) { $ replaced = preg_replace_callback ( self :: $ patterns [ 'bg_horizontal_percentage' ] , array ( 'self' , 'calculateNewBackgroundPosition' ) , $ css ) ; if ( $ replaced !== null ) { // preg_replace_callback() sometimes returns null $ css = $ replaced ; } $ replaced = preg_replace_callback ( self :: $ patterns [ 'bg_horizontal_percentage_x' ] , array ( 'self' , 'calculateNewBackgroundPosition' ) , $ css ) ; if ( $ replaced !== null ) { $ css = $ replaced ; } return $ css ; }
Flip horizontal background percentages.
@param $css string
@return string
Flip horizontal background percentages .