summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/jetpack/modules/custom-css')
-rw-r--r--plugins/jetpack/modules/custom-css/csstidy/class.csstidy.php162
-rw-r--r--plugins/jetpack/modules/custom-css/csstidy/class.csstidy_ctype.php4
-rw-r--r--plugins/jetpack/modules/custom-css/csstidy/class.csstidy_optimise.php38
-rw-r--r--plugins/jetpack/modules/custom-css/csstidy/class.csstidy_print.php6
-rw-r--r--plugins/jetpack/modules/custom-css/csstidy/cssparse-rtl.css4
-rw-r--r--plugins/jetpack/modules/custom-css/csstidy/cssparse.css4
-rw-r--r--plugins/jetpack/modules/custom-css/csstidy/data.inc.php2
-rw-r--r--plugins/jetpack/modules/custom-css/csstidy/lang.inc.php12
-rw-r--r--plugins/jetpack/modules/custom-css/custom-css-4.7.php14
-rw-r--r--plugins/jetpack/modules/custom-css/custom-css.php14
-rw-r--r--plugins/jetpack/modules/custom-css/custom-css/css/codemirror-rtl.css1
-rw-r--r--plugins/jetpack/modules/custom-css/custom-css/css/codemirror-rtl.min.css2
-rw-r--r--plugins/jetpack/modules/custom-css/custom-css/css/codemirror.min.css2
-rw-r--r--plugins/jetpack/modules/custom-css/custom-css/css/customizer-control.css7
-rw-r--r--plugins/jetpack/modules/custom-css/custom-css/js/css-editor.js1
-rw-r--r--plugins/jetpack/modules/custom-css/custom-css/js/use-codemirror.js2
-rw-r--r--plugins/jetpack/modules/custom-css/custom-css/preprocessors/lessc.inc.php23
-rw-r--r--plugins/jetpack/modules/custom-css/custom-css/preprocessors/scss.inc.php8
18 files changed, 151 insertions, 155 deletions
diff --git a/plugins/jetpack/modules/custom-css/csstidy/class.csstidy.php b/plugins/jetpack/modules/custom-css/csstidy/class.csstidy.php
index e92669da..8d977516 100644
--- a/plugins/jetpack/modules/custom-css/csstidy/class.csstidy.php
+++ b/plugins/jetpack/modules/custom-css/csstidy/class.csstidy.php
@@ -19,9 +19,9 @@
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
*
- * @license http://opensource.org/licenses/lgpl-license.php GNU Lesser General Public License
+ * @license https://opensource.org/licenses/lgpl-license.php GNU Lesser General Public License
* @package csstidy
* @author Florian Schmitz (floele at gmail dot com) 2005-2007
* @author Brett Zamir (brettz9 at yahoo dot com) 2007
@@ -64,7 +64,7 @@ require( dirname( __FILE__ ) . '/class.csstidy_optimise.php' );
* In opposite to most other CSS parsers, it does not use regular expressions and
* thus has full CSS2 support and a higher reliability.
* Additional to that it applies some optimisations and fixes to the CSS code.
- * An online version should be available here: http://cdburnerxp.se/cssparse/css_optimiser.php
+ * An online version should be available here: https://cdburnerxp.se/cssparse/css_optimiser.php
* @package csstidy
* @author Florian Schmitz (floele at gmail dot com) 2005-2006
* @version 1.3.1
@@ -406,10 +406,10 @@ class csstidy {
$add = '';
$replaced = false;
- while ($i < strlen($string) && (ctype_xdigit($string{$i}) || ctype_space($string{$i})) && strlen($add) < 6) {
- $add .= $string{$i};
+ while ($i < strlen($string) && (ctype_xdigit($string[$i]) || ctype_space($string[$i])) && strlen($add) < 6) {
+ $add .= $string[$i];
- if (ctype_space($string{$i})) {
+ if (ctype_space($string[$i])) {
break;
}
$i++;
@@ -423,12 +423,12 @@ class csstidy {
$add = trim('\\' . $add);
}
- if (@ctype_xdigit($string{$i + 1}) && ctype_space($string{$i})
- && !$replaced || !ctype_space($string{$i})) {
+ if (@ctype_xdigit($string[$i + 1]) && ctype_space($string[$i])
+ && !$replaced || !ctype_space($string[$i])) {
$i--;
}
- if ($add !== '\\' || !$this->get_cfg('remove_bslash') || strpos($this->tokens_list, $string{$i + 1}) !== false) {
+ if ($add !== '\\' || !$this->get_cfg('remove_bslash') || strpos($this->tokens_list, $string[$i + 1]) !== false) {
return $add;
}
@@ -530,7 +530,7 @@ class csstidy {
* @version 1.11
*/
function is_token(&$string, $i) {
- return (strpos($this->tokens_list, $string{$i}) !== false && !csstidy::escaped($string, $i));
+ return (strpos($this->tokens_list, $string[$i]) !== false && !csstidy::escaped($string, $i));
}
/**
@@ -559,7 +559,7 @@ class csstidy {
$cur_comment = '';
for ($i = 0, $size = strlen($string); $i < $size; $i++) {
- if ($string{$i} === "\n" || $string{$i} === "\r") {
+ if ($string[$i] === "\n" || $string[$i] === "\r") {
++$this->line;
}
@@ -567,28 +567,28 @@ class csstidy {
/* Case in at-block */
case 'at':
if (csstidy::is_token($string, $i)) {
- if ($string{$i} === '/' && @$string{$i + 1} === '*') {
+ if ($string[$i] === '/' && @$string[$i + 1] === '*') {
$this->status = 'ic';
++$i;
$this->from[] = 'at';
- } elseif ($string{$i} === '{') {
+ } elseif ($string[$i] === '{') {
$this->status = 'is';
$this->at = $this->css_new_media_section($this->at);
$this->_add_token(AT_START, $this->at);
- } elseif ($string{$i} === ',') {
+ } elseif ($string[$i] === ',') {
$this->at = trim($this->at) . ',';
- } elseif ($string{$i} === '\\') {
+ } elseif ($string[$i] === '\\') {
$this->at .= $this->_unicode($string, $i);
}
// fix for complicated media, i.e @media screen and (-webkit-min-device-pixel-ratio:1.5)
// '/' is included for ratios in Opera: (-o-min-device-pixel-ratio: 3/2)
- elseif (in_array($string{$i}, array('(', ')', ':', '.', '/'))) {
- $this->at .= $string{$i};
+ elseif (in_array($string[$i], array('(', ')', ':', '.', '/'))) {
+ $this->at .= $string[$i];
}
} else {
$lastpos = strlen($this->at) - 1;
- if (!( (ctype_space($this->at{$lastpos}) || csstidy::is_token($this->at, $lastpos) && $this->at{$lastpos} === ',') && ctype_space($string{$i}))) {
- $this->at .= $string{$i};
+ if (!( (ctype_space($this->at[$lastpos]) || csstidy::is_token($this->at, $lastpos) && $this->at[$lastpos] === ',') && ctype_space($string[$i]))) {
+ $this->at .= $string[$i];
}
}
break;
@@ -596,11 +596,11 @@ class csstidy {
/* Case in-selector */
case 'is':
if (csstidy::is_token($string, $i)) {
- if ($string{$i} === '/' && @$string{$i + 1} === '*' && trim($this->selector) == '') {
+ if ($string[$i] === '/' && @$string[$i + 1] === '*' && trim($this->selector) == '') {
$this->status = 'ic';
++$i;
$this->from[] = 'is';
- } elseif ($string{$i} === '@' && trim($this->selector) == '') {
+ } elseif ($string[$i] === '@' && trim($this->selector) == '') {
// Check for at-rule
$this->invalid_at = true;
foreach ($at_rules as $name => $type) {
@@ -616,24 +616,24 @@ class csstidy {
$this->selector = '@';
$invalid_at_name = '';
for ($j = $i + 1; $j < $size; ++$j) {
- if (!ctype_alpha($string{$j})) {
+ if (!ctype_alpha($string[$j])) {
break;
}
- $invalid_at_name .= $string{$j};
+ $invalid_at_name .= $string[$j];
}
$this->log('Invalid @-rule: ' . $invalid_at_name . ' (removed)', 'Warning');
}
- } elseif (($string{$i} === '"' || $string{$i} === "'")) {
- $this->cur_string[] = $string{$i};
+ } elseif (($string[$i] === '"' || $string[$i] === "'")) {
+ $this->cur_string[] = $string[$i];
$this->status = 'instr';
- $this->str_char[] = $string{$i};
+ $this->str_char[] = $string[$i];
$this->from[] = 'is';
/* fixing CSS3 attribute selectors, i.e. a[href$=".mp3" */
- $this->quoted_string[] = ($string{$i - 1} == '=' );
- } elseif ($this->invalid_at && $string{$i} === ';') {
+ $this->quoted_string[] = ($string[$i - 1] == '=' );
+ } elseif ($this->invalid_at && $string[$i] === ';') {
$this->invalid_at = false;
$this->status = 'is';
- } elseif ($string{$i} === '{') {
+ } elseif ($string[$i] === '{') {
$this->status = 'ip';
if($this->at == '') {
$this->at = $this->css_new_media_section(DEFAULT_AT);
@@ -641,28 +641,28 @@ class csstidy {
$this->selector = $this->css_new_selector($this->at,$this->selector);
$this->_add_token(SEL_START, $this->selector);
$this->added = false;
- } elseif ($string{$i} === '}') {
+ } elseif ($string[$i] === '}') {
$this->_add_token(AT_END, $this->at);
$this->at = '';
$this->selector = '';
$this->sel_separate = array();
- } elseif ($string{$i} === ',') {
+ } elseif ($string[$i] === ',') {
$this->selector = trim($this->selector) . ',';
$this->sel_separate[] = strlen($this->selector);
- } elseif ($string{$i} === '\\') {
+ } elseif ($string[$i] === '\\') {
$this->selector .= $this->_unicode($string, $i);
- } elseif ($string{$i} === '*' && @in_array($string{$i + 1}, array('.', '#', '[', ':'))) {
+ } elseif ($string[$i] === '*' && @in_array($string[$i + 1], array('.', '#', '[', ':'))) {
// remove unnecessary universal selector, FS#147
} else {
- $this->selector .= $string{$i};
+ $this->selector .= $string[$i];
}
} else {
$lastpos = strlen($this->selector) - 1;
- if ($lastpos == -1 || !( (ctype_space($this->selector{$lastpos}) || csstidy::is_token($this->selector, $lastpos) && $this->selector{$lastpos} === ',') && ctype_space($string{$i}))) {
- $this->selector .= $string{$i};
+ if ($lastpos == -1 || !( (ctype_space($this->selector[$lastpos]) || csstidy::is_token($this->selector, $lastpos) && $this->selector[$lastpos] === ',') && ctype_space($string[$i]))) {
+ $this->selector .= $string[$i];
}
- else if (ctype_space($string{$i}) && $this->get_cfg('preserve_css') && !$this->get_cfg('merge_selectors')) {
- $this->selector .= $string{$i};
+ else if (ctype_space($string[$i]) && $this->get_cfg('preserve_css') && !$this->get_cfg('merge_selectors')) {
+ $this->selector .= $string[$i];
}
}
break;
@@ -670,58 +670,58 @@ class csstidy {
/* Case in-property */
case 'ip':
if (csstidy::is_token($string, $i)) {
- if (($string{$i} === ':' || $string{$i} === '=') && $this->property != '') {
+ if (($string[$i] === ':' || $string[$i] === '=') && $this->property != '') {
$this->status = 'iv';
if (!$this->get_cfg('discard_invalid_properties') || csstidy::property_is_valid($this->property)) {
$this->property = $this->css_new_property($this->at,$this->selector,$this->property);
$this->_add_token(PROPERTY, $this->property);
}
- } elseif ($string{$i} === '/' && @$string{$i + 1} === '*' && $this->property == '') {
+ } elseif ($string[$i] === '/' && @$string[$i + 1] === '*' && $this->property == '') {
$this->status = 'ic';
++$i;
$this->from[] = 'ip';
- } elseif ($string{$i} === '}') {
+ } elseif ($string[$i] === '}') {
$this->explode_selectors();
$this->status = 'is';
$this->invalid_at = false;
$this->_add_token(SEL_END, $this->selector);
$this->selector = '';
$this->property = '';
- } elseif ($string{$i} === ';') {
+ } elseif ($string[$i] === ';') {
$this->property = '';
- } elseif ($string{$i} === '\\') {
+ } elseif ($string[$i] === '\\') {
$this->property .= $this->_unicode($string, $i);
}
// else this is dumb IE a hack, keep it
- elseif ($this->property=='' AND !ctype_space($string{$i})) {
- $this->property .= $string{$i};
+ elseif ($this->property=='' AND !ctype_space($string[$i])) {
+ $this->property .= $string[$i];
}
}
- elseif (!ctype_space($string{$i})) {
- $this->property .= $string{$i};
+ elseif (!ctype_space($string[$i])) {
+ $this->property .= $string[$i];
}
break;
/* Case in-value */
case 'iv':
- $pn = (($string{$i} === "\n" || $string{$i} === "\r") && $this->property_is_next($string, $i + 1) || $i == strlen($string) - 1);
- if ((csstidy::is_token($string, $i) || $pn) && (!($string{$i} == ',' && !ctype_space($string{$i+1})))) {
- if ($string{$i} === '/' && @$string{$i + 1} === '*') {
+ $pn = (($string[$i] === "\n" || $string[$i] === "\r") && $this->property_is_next($string, $i + 1) || $i == strlen($string) - 1);
+ if ((csstidy::is_token($string, $i) || $pn) && (!($string[$i] == ',' && !ctype_space($string[$i+1])))) {
+ if ($string[$i] === '/' && @$string[$i + 1] === '*') {
$this->status = 'ic';
++$i;
$this->from[] = 'iv';
- } elseif (($string{$i} === '"' || $string{$i} === "'" || $string{$i} === '(')) {
- $this->cur_string[] = $string{$i};
- $this->str_char[] = ($string{$i} === '(') ? ')' : $string{$i};
+ } elseif (($string[$i] === '"' || $string[$i] === "'" || $string[$i] === '(')) {
+ $this->cur_string[] = $string[$i];
+ $this->str_char[] = ($string[$i] === '(') ? ')' : $string[$i];
$this->status = 'instr';
$this->from[] = 'iv';
$this->quoted_string[] = in_array(strtolower($this->property), $quoted_string_properties);
- } elseif ($string{$i} === ',') {
+ } elseif ($string[$i] === ',') {
$this->sub_value = trim($this->sub_value) . ',';
- } elseif ($string{$i} === '\\') {
+ } elseif ($string[$i] === '\\') {
$this->sub_value .= $this->_unicode($string, $i);
- } elseif ($string{$i} === ';' || $pn) {
- if ($this->selector{0} === '@' && isset($at_rules[substr($this->selector, 1)]) && $at_rules[substr($this->selector, 1)] === 'iv') {
+ } elseif ($string[$i] === ';' || $pn) {
+ if ($this->selector[0] === '@' && isset($at_rules[substr($this->selector, 1)]) && $at_rules[substr($this->selector, 1)] === 'iv') {
$this->status = 'is';
switch ($this->selector) {
@@ -741,7 +741,7 @@ class csstidy {
if (empty($this->sub_value_arr)) {
// Quote URLs in imports only if they're not already inside url() and not already quoted.
if (substr($this->sub_value, 0, 4) != 'url(') {
- if (!($this->sub_value{0} == substr($this->sub_value, -1) && in_array($this->sub_value{0}, array("'", '"')))) {
+ if (!($this->sub_value[0] == substr($this->sub_value, -1) && in_array($this->sub_value[0], array("'", '"')))) {
$this->sub_value = '"' . $this->sub_value . '"';
}
}
@@ -759,10 +759,10 @@ class csstidy {
} else {
$this->status = 'ip';
}
- } elseif ($string{$i} !== '}') {
- $this->sub_value .= $string{$i};
+ } elseif ($string[$i] !== '}') {
+ $this->sub_value .= $string[$i];
}
- if (($string{$i} === '}' || $string{$i} === ';' || $pn) && !empty($this->selector)) {
+ if (($string[$i] === '}' || $string[$i] === ';' || $pn) && !empty($this->selector)) {
if ($this->at == '') {
$this->at = $this->css_new_media_section(DEFAULT_AT);
}
@@ -822,7 +822,7 @@ class csstidy {
$this->sub_value_arr = array();
$this->value = '';
}
- if ($string{$i} === '}') {
+ if ($string[$i] === '}') {
$this->explode_selectors();
$this->_add_token(SEL_END, $this->selector);
$this->status = 'is';
@@ -830,9 +830,9 @@ class csstidy {
$this->selector = '';
}
} elseif (!$pn) {
- $this->sub_value .= $string{$i};
+ $this->sub_value .= $string[$i];
- if (ctype_space($string{$i}) || $string{$i} == ',') {
+ if (ctype_space($string[$i]) || $string[$i] == ',') {
$this->optimise->subvalue();
if ($this->sub_value != '') {
$this->sub_value_arr[] = $this->sub_value;
@@ -846,26 +846,26 @@ class csstidy {
case 'instr':
$_str_char = $this->str_char[count($this->str_char)-1];
$_cur_string = $this->cur_string[count($this->cur_string)-1];
- $temp_add = $string{$i};
+ $temp_add = $string[$i];
// Add another string to the stack. Strings can't be nested inside of quotes, only parentheses, but
// parentheticals can be nested more than once.
- if ($_str_char === ")" && ($string{$i} === "(" || $string{$i} === '"' || $string{$i} === '\'') && !csstidy::escaped($string, $i)) {
- $this->cur_string[] = $string{$i};
- $this->str_char[] = $string{$i} == "(" ? ")" : $string{$i};
+ if ($_str_char === ")" && ($string[$i] === "(" || $string[$i] === '"' || $string[$i] === '\'') && !csstidy::escaped($string, $i)) {
+ $this->cur_string[] = $string[$i];
+ $this->str_char[] = $string[$i] == "(" ? ")" : $string[$i];
$this->from[] = 'instr';
- $this->quoted_string[] = !($string{$i} === "(");
+ $this->quoted_string[] = !($string[$i] === "(");
continue 2;
}
- if ($_str_char !== ")" && ($string{$i} === "\n" || $string{$i} === "\r") && !($string{$i - 1} === '\\' && !csstidy::escaped($string, $i - 1))) {
+ if ($_str_char !== ")" && ($string[$i] === "\n" || $string[$i] === "\r") && !($string[$i - 1] === '\\' && !csstidy::escaped($string, $i - 1))) {
$temp_add = "\\A";
$this->log('Fixed incorrect newline in string', 'Warning');
}
$_cur_string .= $temp_add;
- if ($string{$i} === $_str_char && !csstidy::escaped($string, $i)) {
+ if ($string[$i] === $_str_char && !csstidy::escaped($string, $i)) {
$_quoted_string = array_pop($this->quoted_string);
$this->status = array_pop($this->from);
@@ -918,13 +918,13 @@ class csstidy {
/* Case in-comment */
case 'ic':
- if ($string{$i} === '*' && $string{$i + 1} === '/') {
+ if ($string[$i] === '*' && $string[$i + 1] === '/') {
$this->status = array_pop($this->from);
$i++;
$this->_add_token(COMMENT, $cur_comment);
$cur_comment = '';
} else {
- $cur_comment .= $string{$i};
+ $cur_comment .= $string[$i];
}
break;
}
@@ -980,7 +980,7 @@ class csstidy {
* @version 1.02
*/
static function escaped(&$string, $pos) {
- return!(@($string{$pos - 1} !== '\\') || csstidy::escaped($string, $pos - 1));
+ return!(@($string[$pos - 1] !== '\\') || csstidy::escaped($string, $pos - 1));
}
/**
@@ -1208,30 +1208,30 @@ class csstidy {
$current_string = "";
for ($i = 0, $_len = strlen($value); $i < $_len; $i++) {
- if (($value{$i} == "," || $value{$i} === " ") && $in_str === true) {
+ if (($value[$i] == "," || $value[$i] === " ") && $in_str === true) {
$in_str = false;
$strings[] = $current_string;
$current_string = "";
}
- else if ($value{$i} == '"' || $value{$i} == "'"){
- if ($in_str === $value{$i}) {
+ else if ($value[$i] == '"' || $value[$i] == "'"){
+ if ($in_str === $value[$i]) {
$strings[] = $current_string;
$in_str = false;
$current_string = "";
continue;
}
else if (!$in_str) {
- $in_str = $value{$i};
+ $in_str = $value[$i];
}
}
else {
if ($in_str){
- $current_string .= $value{$i};
+ $current_string .= $value[$i];
}
else {
- if (!preg_match("/[\s,]/", $value{$i})) {
+ if (!preg_match("/[\s,]/", $value[$i])) {
$in_str = true;
- $current_string = $value{$i};
+ $current_string = $value[$i];
}
}
}
diff --git a/plugins/jetpack/modules/custom-css/csstidy/class.csstidy_ctype.php b/plugins/jetpack/modules/custom-css/csstidy/class.csstidy_ctype.php
index bc5accc5..37e87f7d 100644
--- a/plugins/jetpack/modules/custom-css/csstidy/class.csstidy_ctype.php
+++ b/plugins/jetpack/modules/custom-css/csstidy/class.csstidy_ctype.php
@@ -22,7 +22,7 @@
* along with CSSTidy; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
- * @license http://opensource.org/licenses/gpl-license.php GNU Public License
+ * @license https://opensource.org/licenses/gpl-license.php GNU Public License
* @package csstidy
* @author Nikolay Matsievsky (speed at webo dot name) 2009-2010
* @version 1.0
@@ -43,4 +43,4 @@ if (!function_exists('ctype_alpha')) {
}
}
-?> \ No newline at end of file
+?>
diff --git a/plugins/jetpack/modules/custom-css/csstidy/class.csstidy_optimise.php b/plugins/jetpack/modules/custom-css/csstidy/class.csstidy_optimise.php
index 176e0fd3..2d7996f0 100644
--- a/plugins/jetpack/modules/custom-css/csstidy/class.csstidy_optimise.php
+++ b/plugins/jetpack/modules/custom-css/csstidy/class.csstidy_optimise.php
@@ -21,9 +21,9 @@
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
*
- * @license http://opensource.org/licenses/lgpl-license.php GNU Lesser General Public License
+ * @license https://opensource.org/licenses/lgpl-license.php GNU Lesser General Public License
* @package csstidy
* @author Florian Schmitz (floele at gmail dot com) 2005-2007
* @author Brett Zamir (brettz9 at yahoo dot com) 2007
@@ -308,8 +308,8 @@ class csstidy_optimise {
// #aabbcc -> #abc
if (strlen($color) == 7) {
$color_temp = strtolower($color);
- if ($color_temp{0} === '#' && $color_temp{1} == $color_temp{2} && $color_temp{3} == $color_temp{4} && $color_temp{5} == $color_temp{6}) {
- $color = '#' . $color{1} . $color{3} . $color{5};
+ if ($color_temp[0] === '#' && $color_temp[1] == $color_temp[2] && $color_temp[3] == $color_temp[4] && $color_temp[5] == $color_temp[6]) {
+ $color = '#' . $color[1] . $color[3] . $color[5];
}
}
@@ -392,7 +392,7 @@ class csstidy_optimise {
*/
function AnalyseCssNumber($string) {
// most simple checks first
- if (strlen($string) == 0 || ctype_alpha($string{0})) {
+ if (strlen($string) == 0 || ctype_alpha($string[0])) {
return false;
}
@@ -557,22 +557,22 @@ class csstidy_optimise {
for ($i = 0, $len = strlen($string); $i < $len; $i++) {
switch ($status) {
case 'st':
- if ($string{$i} == $sep && !csstidy::escaped($string, $i)) {
+ if ($string[$i] == $sep && !csstidy::escaped($string, $i)) {
++$num;
- } elseif ($string{$i} === '"' || $string{$i} === '\'' || $string{$i} === '(' && !csstidy::escaped($string, $i)) {
+ } elseif ($string[$i] === '"' || $string[$i] === '\'' || $string[$i] === '(' && !csstidy::escaped($string, $i)) {
$status = 'str';
- $to = ($string{$i} === '(') ? ')' : $string{$i};
- (isset($output[$num])) ? $output[$num] .= $string{$i} : $output[$num] = $string{$i};
+ $to = ($string[$i] === '(') ? ')' : $string[$i];
+ (isset($output[$num])) ? $output[$num] .= $string[$i] : $output[$num] = $string[$i];
} else {
- (isset($output[$num])) ? $output[$num] .= $string{$i} : $output[$num] = $string{$i};
+ (isset($output[$num])) ? $output[$num] .= $string[$i] : $output[$num] = $string[$i];
}
break;
case 'str':
- if ($string{$i} == $to && !csstidy::escaped($string, $i)) {
+ if ($string[$i] == $to && !csstidy::escaped($string, $i)) {
$status = 'st';
}
- (isset($output[$num])) ? $output[$num] .= $string{$i} : $output[$num] = $string{$i};
+ (isset($output[$num])) ? $output[$num] .= $string[$i] : $output[$num] = $string[$i];
break;
}
}
@@ -626,6 +626,7 @@ class csstidy_optimise {
* @todo full CSS 3 compliance
*/
static function dissolve_short_bg($str_value) {
+ $have = array();
// don't try to explose background gradient !
if (stripos($str_value, "gradient(")!==FALSE)
return array('background'=>$str_value);
@@ -669,9 +670,9 @@ class csstidy_optimise {
$have['clip'] = true;
} elseif (in_array($str_value[$i][$j], $origin, true)) {
$return['background-origin'] .= $str_value[$i][$j] . ',';
- } elseif ($str_value[$i][$j]{0} === '(') {
+ } elseif ($str_value[$i][$j][0] === '(') {
$return['background-size'] .= substr($str_value[$i][$j], 1, -1) . ',';
- } elseif (in_array($str_value[$i][$j], $pos, true) || is_numeric($str_value[$i][$j]{0}) || $str_value[$i][$j]{0} === null || $str_value[$i][$j]{0} === '-' || $str_value[$i][$j]{0} === '.') {
+ } elseif (in_array($str_value[$i][$j], $pos, true) || is_numeric($str_value[$i][$j][0]) || $str_value[$i][$j][0] === null || $str_value[$i][$j][0] === '-' || $str_value[$i][$j][0] === '.') {
$return['background-position'] .= $str_value[$i][$j];
if (!$have['pos'])
$return['background-position'] .= ' '; else
@@ -784,6 +785,7 @@ class csstidy_optimise {
* @see merge_font()
*/
static function dissolve_short_font($str_value) {
+ $have = array();
$font_prop_default = & $GLOBALS['csstidy']['font_prop_default'];
$font_weight = array('normal', 'bold', 'bolder', 'lighter', 100, 200, 300, 400, 500, 600, 700, 800, 900);
$font_variant = array('normal', 'small-caps');
@@ -818,7 +820,7 @@ class csstidy_optimise {
} elseif ($have['style'] === false && in_array($str_value[0][$j], $font_style)) {
$return['font-style'] = $str_value[0][$j];
$have['style'] = true;
- } elseif ($have['size'] === false && (is_numeric($str_value[0][$j]{0}) || $str_value[0][$j]{0} === null || $str_value[0][$j]{0} === '.')) {
+ } elseif ($have['size'] === false && (is_numeric($str_value[0][$j][0]) || $str_value[0][$j][0] === null || $str_value[0][$j][0] === '.')) {
$size = csstidy_optimise::explode_ws('/', trim($str_value[0][$j]));
$return['font-size'] = $size[0];
if (isset($size[1])) {
@@ -848,7 +850,7 @@ class csstidy_optimise {
// Fix for 100 and more font-size
if ($have['size'] === false && isset($return['font-weight']) &&
- is_numeric($return['font-weight']{0})) {
+ is_numeric($return['font-weight'][0])) {
$return['font-size'] = $return['font-weight'];
unset($return['font-weight']);
}
@@ -884,8 +886,8 @@ class csstidy_optimise {
$family = trim($family);
$len = strlen($family);
if (strpos($family, " ") &&
- !(($family{0} == '"' && $family{$len - 1} == '"') ||
- ($family{0} == "'" && $family{$len - 1} == "'"))) {
+ !(($family[0] == '"' && $family[$len - 1] == '"') ||
+ ($family[0] == "'" && $family[$len - 1] == "'"))) {
$family = '"' . $family . '"';
}
$result_families[] = $family;
diff --git a/plugins/jetpack/modules/custom-css/csstidy/class.csstidy_print.php b/plugins/jetpack/modules/custom-css/csstidy/class.csstidy_print.php
index 56b95404..fc8cf628 100644
--- a/plugins/jetpack/modules/custom-css/csstidy/class.csstidy_print.php
+++ b/plugins/jetpack/modules/custom-css/csstidy/class.csstidy_print.php
@@ -20,9 +20,9 @@
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
*
- * @license http://opensource.org/licenses/lgpl-license.php GNU Lesser General Public License
+ * @license https://opensource.org/licenses/lgpl-license.php GNU Lesser General Public License
* @package csstidy
* @author Florian Schmitz (floele at gmail dot com) 2005-2007
* @author Brett Zamir (brettz9 at yahoo dot com) 2007
@@ -222,7 +222,7 @@ class csstidy_print {
case SEL_START:
if ($this->parser->get_cfg('lowercase_s'))
$token[1] = strtolower($token[1]);
- $out .= ( $token[1]{0} !== '@') ? $template[2] . $this->_htmlsp($token[1], $plain) : $template[0] . $this->_htmlsp($token[1], $plain);
+ $out .= ( $token[1][0] !== '@') ? $template[2] . $this->_htmlsp($token[1], $plain) : $template[0] . $this->_htmlsp($token[1], $plain);
$out .= $template[3];
break;
diff --git a/plugins/jetpack/modules/custom-css/csstidy/cssparse-rtl.css b/plugins/jetpack/modules/custom-css/csstidy/cssparse-rtl.css
index 54a7a9c9..522433be 100644
--- a/plugins/jetpack/modules/custom-css/csstidy/cssparse-rtl.css
+++ b/plugins/jetpack/modules/custom-css/csstidy/cssparse-rtl.css
@@ -1,5 +1,5 @@
/* Do not modify this file directly. It is concatenated from individual module CSS files. */
-@import url("modules/custom-css/csstidy/cssparsed.css");
+@import url("./cssparsed.css");
html, body {
font:0.8em Verdana,Helvetica,sans-serif;
@@ -116,4 +116,4 @@ color:orange;
dd.Information {
color:green;
-} \ No newline at end of file
+}
diff --git a/plugins/jetpack/modules/custom-css/csstidy/cssparse.css b/plugins/jetpack/modules/custom-css/csstidy/cssparse.css
index bddd34f9..4dab9b50 100644
--- a/plugins/jetpack/modules/custom-css/csstidy/cssparse.css
+++ b/plugins/jetpack/modules/custom-css/csstidy/cssparse.css
@@ -1,4 +1,4 @@
-@import url("modules/custom-css/csstidy/cssparsed.css");
+@import url("./cssparsed.css");
html, body {
font:0.8em Verdana,Helvetica,sans-serif;
@@ -115,4 +115,4 @@ color:orange;
dd.Information {
color:green;
-} \ No newline at end of file
+}
diff --git a/plugins/jetpack/modules/custom-css/csstidy/data.inc.php b/plugins/jetpack/modules/custom-css/csstidy/data.inc.php
index 9ed2e1c4..0cf8f9a3 100644
--- a/plugins/jetpack/modules/custom-css/csstidy/data.inc.php
+++ b/plugins/jetpack/modules/custom-css/csstidy/data.inc.php
@@ -18,7 +18,7 @@
* along with CSSTidy; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
- * @license http://opensource.org/licenses/gpl-license.php GNU Public License
+ * @license https://opensource.org/licenses/gpl-license.php GNU Public License
* @package csstidy
* @author Florian Schmitz (floele at gmail dot com) 2005
* @author Nikolay Matsievsky (speed at webo dot name) 2010
diff --git a/plugins/jetpack/modules/custom-css/csstidy/lang.inc.php b/plugins/jetpack/modules/custom-css/csstidy/lang.inc.php
index d4c61114..0a3ad014 100644
--- a/plugins/jetpack/modules/custom-css/csstidy/lang.inc.php
+++ b/plugins/jetpack/modules/custom-css/csstidy/lang.inc.php
@@ -18,9 +18,9 @@
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
*
- * @license http://opensource.org/licenses/lgpl-license.php GNU Lesser General Public License
+ * @license https://opensource.org/licenses/lgpl-license.php GNU Lesser General Public License
* @package csstidy
* @author Florian Schmitz (floele at gmail dot com) 2005-2007
* @author Brett Zamir (brettz9 at yahoo dot com) 2007
@@ -45,7 +45,7 @@ $lang['en'][1] = 'CSS Formatter and Optimiser';
$lang['en'][2] = '(based on';
$lang['en'][3] = '(plaintext)';
$lang['en'][4] = 'Important Note:';
-$lang['en'][6] = 'Your code should be well-formed. This is <strong>not a validator</strong> which points out errors in your CSS code. To make sure that your code is valid, use the <a href="http://jigsaw.w3.org/css-validator/">W3C Validator</a>.';
+$lang['en'][6] = 'Your code should be well-formed. This is <strong>not a validator</strong> which points out errors in your CSS code. To make sure that your code is valid, use the <a href="https://jigsaw.w3.org/css-validator/">W3C Validator</a>.';
$lang['en'][7] = 'all comments are removed';
$lang['en'][8] = 'CSS Input:';
$lang['en'][9] = 'CSS-Code:';
@@ -112,7 +112,7 @@ $lang['de'][1] = 'CSS Formatierer und Optimierer';
$lang['de'][2] = '(basierend auf';
$lang['de'][3] = '(Textversion)';
$lang['de'][4] = 'Wichtiger Hinweis:';
-$lang['de'][6] = 'Der CSS Code sollte wohlgeformt sein. Der CSS Code wird <strong>nicht auf Gültigkeit überprüft</strong>. Um sicherzugehen dass dein Code valide ist, benutze den <a href="http://jigsaw.w3.org/css-validator/">W3C Validierungsservice</a>.';
+$lang['de'][6] = 'Der CSS Code sollte wohlgeformt sein. Der CSS Code wird <strong>nicht auf Gültigkeit überprüft</strong>. Um sicherzugehen dass dein Code valide ist, benutze den <a href="https://jigsaw.w3.org/css-validator/">W3C Validierungsservice</a>.';
$lang['de'][7] = 'alle Kommentare werden entfernt';
$lang['de'][8] = 'CSS Eingabe:';
$lang['de'][9] = 'CSS-Code:';
@@ -179,7 +179,7 @@ $lang['fr'][1] = 'CSS Formatteur et Optimiseur';
$lang['fr'][2] = '(basé sur ';
$lang['fr'][3] = '(Version texte)';
$lang['fr'][4] = 'Note Importante&#160;:';
-$lang['fr'][6] = 'Votre code doit être valide. Ce n’est <strong>pas un validateur</strong> qui signale les erreurs dans votre code CSS. Pour être sûr que votre code est correct, utilisez le validateur&#160;: <a href="http://jigsaw.w3.org/css-validator/">W3C Validator</a>.';
+$lang['fr'][6] = 'Votre code doit être valide. Ce n’est <strong>pas un validateur</strong> qui signale les erreurs dans votre code CSS. Pour être sûr que votre code est correct, utilisez le validateur&#160;: <a href="https://jigsaw.w3.org/css-validator/">W3C Validator</a>.';
$lang['fr'][7] = 'tous les commentaires sont enlevés';
$lang['fr'][8] = 'Champ CSS&#160;:';
$lang['fr'][9] = 'Code CSS&#160;:';
@@ -246,7 +246,7 @@ $lang['zh'][1] = 'CSS整形與最佳化工具';
$lang['zh'][2] = '(使用';
$lang['zh'][3] = '(純文字)';
$lang['zh'][4] = '重要事項:';
-$lang['zh'][6] = '你的原始碼必須是良構的(well-formed). 這個工具<strong>沒有內建驗證器(validator)</strong>. 驗證器能夠指出你CSS原始碼裡的錯誤. 請使用 <a href="http://jigsaw.w3.org/css-validator/">W3C 驗證器</a>, 確保你的原始碼合乎規範.';
+$lang['zh'][6] = '你的原始碼必須是良構的(well-formed). 這個工具<strong>沒有內建驗證器(validator)</strong>. 驗證器能夠指出你CSS原始碼裡的錯誤. 請使用 <a href="https://jigsaw.w3.org/css-validator/">W3C 驗證器</a>, 確保你的原始碼合乎規範.';
$lang['zh'][7] = '所有註解都移除了';
$lang['zh'][8] = 'CSS 輸入:';
$lang['zh'][9] = 'CSS 原始碼:';
diff --git a/plugins/jetpack/modules/custom-css/custom-css-4.7.php b/plugins/jetpack/modules/custom-css/custom-css-4.7.php
index bb72caec..4a706f6c 100644
--- a/plugins/jetpack/modules/custom-css/custom-css-4.7.php
+++ b/plugins/jetpack/modules/custom-css/custom-css-4.7.php
@@ -1,4 +1,7 @@
<?php
+
+use Automattic\Jetpack\Assets;
+
/**
* Alternate Custom CSS source for 4.7 compat.
*
@@ -11,6 +14,7 @@
* Class Jetpack_Custom_CSS_Enhancements
*/
class Jetpack_Custom_CSS_Enhancements {
+
/**
* Set up the actions and filters needed for our compatability layer on top of core's Custom CSS implementation.
*/
@@ -57,15 +61,19 @@ class Jetpack_Custom_CSS_Enhancements {
wp_register_style( 'jetpack-codemirror', plugins_url( 'custom-css/css/codemirror.css', __FILE__ ), array(), '20120905' );
wp_register_style( 'jetpack-customizer-css', plugins_url( 'custom-css/css/customizer-control.css', __FILE__ ), array(), '20140728' );
wp_register_script( 'jetpack-codemirror', plugins_url( 'custom-css/js/codemirror.min.js', __FILE__ ), array(), '3.16', true );
- $src = Jetpack::get_file_url_for_environment(
+
+ $src = Assets::get_file_url_for_environment(
'_inc/build/custom-css/custom-css/js/core-customizer-css.core-4.9.min.js',
'modules/custom-css/custom-css/js/core-customizer-css.core-4.9.js'
);
- wp_register_script( 'jetpack-customizer-css', $src, array( 'customize-controls', 'underscore' ), JETPACK__VERSION, true );
+ wp_register_script( 'jetpack-customizer-css', $src, array(
+ 'customize-controls',
+ 'underscore'
+ ), JETPACK__VERSION, true );
wp_register_script(
'jetpack-customizer-css-preview',
- Jetpack::get_file_url_for_environment(
+ Assets::get_file_url_for_environment(
'_inc/build/custom-css/custom-css/js/core-customizer-css-preview.min.js',
'modules/custom-css/custom-css/js/core-customizer-css-preview.js'
),
diff --git a/plugins/jetpack/modules/custom-css/custom-css.php b/plugins/jetpack/modules/custom-css/custom-css.php
index 6229014b..068b1f0b 100644
--- a/plugins/jetpack/modules/custom-css/custom-css.php
+++ b/plugins/jetpack/modules/custom-css/custom-css.php
@@ -1,5 +1,7 @@
<?php
+use Automattic\Jetpack\Assets;
+
class Jetpack_Custom_CSS {
static function init() {
add_action( 'switch_theme', array( __CLASS__, 'reset' ) );
@@ -24,7 +26,7 @@ class Jetpack_Custom_CSS {
! Jetpack_User_Agent_Info::is_ipad() &&
/**
* Should the Custom CSS module use ACE to process CSS.
- * @see http://ace.c9.io/
+ * @see https://ace.c9.io/
*
* @module custom-css
*
@@ -632,7 +634,7 @@ class Jetpack_Custom_CSS {
apply_filters(
'safecss_default_css',
__(
- "Welcome to Custom CSS!\n\nTo learn how this works, see http://wp.me/PEmnE-Bt",
+ "Welcome to Custom CSS!\n\nTo learn how this works, see https://wp.me/PEmnE-Bt",
'jetpack'
)
)
@@ -932,7 +934,7 @@ class Jetpack_Custom_CSS {
wp_enqueue_script( 'postbox' );
wp_enqueue_script(
'custom-css-editor',
- Jetpack::get_file_url_for_environment(
+ Assets::get_file_url_for_environment(
'_inc/build/custom-css/custom-css/js/css-editor.min.js',
'modules/custom-css/custom-css/js/css-editor.js'
),
@@ -949,7 +951,7 @@ class Jetpack_Custom_CSS {
wp_register_script( 'jetpack-css-codemirror', plugins_url( 'custom-css/js/codemirror.min.js', __FILE__ ), array(), '3.16', true );
wp_enqueue_script(
'jetpack-css-use-codemirror',
- Jetpack::get_file_url_for_environment(
+ Assets::get_file_url_for_environment(
'_inc/build/custom-css/custom-css/js/use-codemirror.min.js',
'modules/custom-css/custom-css/js/use-codemirror.js'
),
@@ -1004,7 +1006,7 @@ class Jetpack_Custom_CSS {
*
* @param string $str Intro text appearing above the Custom CSS editor.
*/
- echo apply_filters( 'safecss_intro_text', __( 'New to CSS? Start with a <a href="http://www.htmldog.com/guides/cssbeginner/" rel="noopener noreferrer" target="_blank">beginner tutorial</a>. Questions?
+ echo apply_filters( 'safecss_intro_text', __( 'New to CSS? Start with a <a href="https://www.htmldog.com/guides/css/beginner/" rel="noopener noreferrer" target="_blank">beginner tutorial</a>. Questions?
Ask in the <a href="https://wordpress.org/support/forum/themes-and-templates" rel="noopener noreferrer" target="_blank">Themes and Templates forum</a>.', 'jetpack' ) );
?></p>
<p class="css-support"><?php echo __( 'Note: Custom CSS will be reset when changing themes.', 'jetpack' ); ?></p>
@@ -1064,7 +1066,7 @@ class Jetpack_Custom_CSS {
*
* @param string $url Custom CSS limited width's support doc URL.
*/
- apply_filters( 'safecss_limit_width_link', 'http://jetpack.com/support/custom-css/#limited-width' )
+ apply_filters( 'safecss_limit_width_link', 'https://jetpack.com/support/custom-css/#limited-width' )
);
?>
diff --git a/plugins/jetpack/modules/custom-css/custom-css/css/codemirror-rtl.css b/plugins/jetpack/modules/custom-css/custom-css/css/codemirror-rtl.css
index 359717bf..9450df66 100644
--- a/plugins/jetpack/modules/custom-css/custom-css/css/codemirror-rtl.css
+++ b/plugins/jetpack/modules/custom-css/custom-css/css/codemirror-rtl.css
@@ -199,7 +199,6 @@ div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
.CodeMirror-code pre {
border-left: 30px solid transparent;
width: -webkit-fit-content;
- width: -moz-fit-content;
width: fit-content;
}
.CodeMirror-wrap .CodeMirror-code pre {
diff --git a/plugins/jetpack/modules/custom-css/custom-css/css/codemirror-rtl.min.css b/plugins/jetpack/modules/custom-css/custom-css/css/codemirror-rtl.min.css
index bb4ede28..4e4255ba 100644
--- a/plugins/jetpack/modules/custom-css/custom-css/css/codemirror-rtl.min.css
+++ b/plugins/jetpack/modules/custom-css/custom-css/css/codemirror-rtl.min.css
@@ -1 +1 @@
-.rtl .CodeMirror{direction:rtl}.CodeMirror{font-family:monospace;height:400px}.CodeMirror-scroll{overflow:auto}.CodeMirror-lines{padding:4px 0}.CodeMirror pre{padding:0 4px}.CodeMirror-gutter-filler,.CodeMirror-scrollbar-filler{background-color:#fff}.CodeMirror-gutters{border-left:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 5px 0 3px;min-width:20px;text-align:left;color:#999}.CodeMirror div.CodeMirror-cursor{border-right:1px solid #000;z-index:3}.CodeMirror div.CodeMirror-secondarycursor{border-right:1px solid silver}.CodeMirror.cm-keymap-fat-cursor div.CodeMirror-cursor{width:auto;border:0;background:#7e7;z-index:1}.cm-tab{display:inline-block}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable{color:#000}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-variable-3{color:#085}.cm-s-default .cm-property{color:#000}.cm-s-default .cm-operator{color:#000}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta{color:#555}.cm-s-default .cm-error{color:red}.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-header{color:#00f}.cm-s-default .cm-quote{color:#090}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:700}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-invalidchar{color:red}div.CodeMirror span.CodeMirror-matchingbracket{color:#0f0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#f22}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{line-height:1;position:relative;overflow:hidden;background:#fff;color:#000}.CodeMirror-scroll{margin-bottom:-30px;margin-left:-30px;padding-bottom:30px;padding-left:30px;height:100%;outline:0;position:relative}.CodeMirror-sizer{position:relative}.CodeMirror-gutter-filler,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-vscrollbar{position:absolute;z-index:6;display:none}.CodeMirror-vscrollbar{left:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;right:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{left:0;bottom:0}.CodeMirror-gutter-filler{right:0;bottom:0}.CodeMirror-gutters{position:absolute;right:0;top:0;padding-bottom:30px;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;padding-bottom:30px;margin-bottom:-32px;display:inline-block}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-lines{cursor:text}.CodeMirror pre{border-radius:0;border-width:0;background:0 0;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible}.CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-code pre{border-left:30px solid transparent;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.CodeMirror-wrap .CodeMirror-code pre{border-left:none;width:auto}.CodeMirror-linebackground{position:absolute;right:0;left:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;overflow:auto}.CodeMirror-wrap .CodeMirror-scroll{overflow-x:hidden}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-measure pre{position:static}.CodeMirror div.CodeMirror-cursor{position:absolute;visibility:hidden;border-left:none;width:0}.CodeMirror-focused div.CodeMirror-cursor{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.cm-searching{background:#ffa;background:rgba(255,255,0,.4)}@media print{.CodeMirror div.CodeMirror-cursor{visibility:hidden}} \ No newline at end of file
+.rtl .CodeMirror{direction:rtl}.CodeMirror{font-family:monospace;height:400px}.CodeMirror-scroll{overflow:auto}.CodeMirror-lines{padding:4px 0}.CodeMirror pre{padding:0 4px}.CodeMirror-gutter-filler,.CodeMirror-scrollbar-filler{background-color:#fff}.CodeMirror-gutters{border-left:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 5px 0 3px;min-width:20px;text-align:left;color:#999}.CodeMirror div.CodeMirror-cursor{border-right:1px solid #000;z-index:3}.CodeMirror div.CodeMirror-secondarycursor{border-right:1px solid silver}.CodeMirror.cm-keymap-fat-cursor div.CodeMirror-cursor{width:auto;border:0;background:#7e7;z-index:1}.cm-tab{display:inline-block}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable{color:#000}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-variable-3{color:#085}.cm-s-default .cm-property{color:#000}.cm-s-default .cm-operator{color:#000}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta{color:#555}.cm-s-default .cm-error{color:red}.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-header{color:#00f}.cm-s-default .cm-quote{color:#090}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:700}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-invalidchar{color:red}div.CodeMirror span.CodeMirror-matchingbracket{color:#0f0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#f22}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{line-height:1;position:relative;overflow:hidden;background:#fff;color:#000}.CodeMirror-scroll{margin-bottom:-30px;margin-left:-30px;padding-bottom:30px;padding-left:30px;height:100%;outline:0;position:relative}.CodeMirror-sizer{position:relative}.CodeMirror-gutter-filler,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-vscrollbar{position:absolute;z-index:6;display:none}.CodeMirror-vscrollbar{left:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;right:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{left:0;bottom:0}.CodeMirror-gutter-filler{right:0;bottom:0}.CodeMirror-gutters{position:absolute;right:0;top:0;padding-bottom:30px;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;padding-bottom:30px;margin-bottom:-32px;display:inline-block}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-lines{cursor:text}.CodeMirror pre{border-radius:0;border-width:0;background:0 0;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible}.CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-code pre{border-left:30px solid transparent;width:-webkit-fit-content;width:fit-content}.CodeMirror-wrap .CodeMirror-code pre{border-left:none;width:auto}.CodeMirror-linebackground{position:absolute;right:0;left:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;overflow:auto}.CodeMirror-wrap .CodeMirror-scroll{overflow-x:hidden}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-measure pre{position:static}.CodeMirror div.CodeMirror-cursor{position:absolute;visibility:hidden;border-left:none;width:0}.CodeMirror-focused div.CodeMirror-cursor{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.cm-searching{background:#ffa;background:rgba(255,255,0,.4)}@media print{.CodeMirror div.CodeMirror-cursor{visibility:hidden}} \ No newline at end of file
diff --git a/plugins/jetpack/modules/custom-css/custom-css/css/codemirror.min.css b/plugins/jetpack/modules/custom-css/custom-css/css/codemirror.min.css
index 92af420a..e7b11f4b 100644
--- a/plugins/jetpack/modules/custom-css/custom-css/css/codemirror.min.css
+++ b/plugins/jetpack/modules/custom-css/custom-css/css/codemirror.min.css
@@ -1,2 +1,2 @@
/* Do not modify this file directly. It is concatenated from individual module CSS files. */
-.rtl .CodeMirror{direction:ltr}.CodeMirror{font-family:monospace;height:400px}.CodeMirror-scroll{overflow:auto}.CodeMirror-lines{padding:4px 0}.CodeMirror pre{padding:0 4px}.CodeMirror-gutter-filler,.CodeMirror-scrollbar-filler{background-color:#fff}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999}.CodeMirror div.CodeMirror-cursor{border-left:1px solid #000;z-index:3}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.CodeMirror.cm-keymap-fat-cursor div.CodeMirror-cursor{width:auto;border:0;background:#7e7;z-index:1}.cm-tab{display:inline-block}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable{color:#000}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-variable-3{color:#085}.cm-s-default .cm-property{color:#000}.cm-s-default .cm-operator{color:#000}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta{color:#555}.cm-s-default .cm-error{color:red}.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-header{color:#00f}.cm-s-default .cm-quote{color:#090}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:700}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-invalidchar{color:red}div.CodeMirror span.CodeMirror-matchingbracket{color:#0f0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#f22}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{line-height:1;position:relative;overflow:hidden;background:#fff;color:#000}.CodeMirror-scroll{margin-bottom:-30px;margin-right:-30px;padding-bottom:30px;padding-right:30px;height:100%;outline:0;position:relative}.CodeMirror-sizer{position:relative}.CodeMirror-gutter-filler,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-vscrollbar{position:absolute;z-index:6;display:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;padding-bottom:30px;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;padding-bottom:30px;margin-bottom:-32px;display:inline-block}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-lines{cursor:text}.CodeMirror pre{border-radius:0;border-width:0;background:0 0;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible}.CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-code pre{border-right:30px solid transparent;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.CodeMirror-wrap .CodeMirror-code pre{border-right:none;width:auto}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;overflow:auto}.CodeMirror-wrap .CodeMirror-scroll{overflow-x:hidden}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-measure pre{position:static}.CodeMirror div.CodeMirror-cursor{position:absolute;visibility:hidden;border-right:none;width:0}.CodeMirror-focused div.CodeMirror-cursor{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.cm-searching{background:#ffa;background:rgba(255,255,0,.4)}@media print{.CodeMirror div.CodeMirror-cursor{visibility:hidden}} \ No newline at end of file
+.rtl .CodeMirror{direction:ltr}.CodeMirror{font-family:monospace;height:400px}.CodeMirror-scroll{overflow:auto}.CodeMirror-lines{padding:4px 0}.CodeMirror pre{padding:0 4px}.CodeMirror-gutter-filler,.CodeMirror-scrollbar-filler{background-color:#fff}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999}.CodeMirror div.CodeMirror-cursor{border-left:1px solid #000;z-index:3}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.CodeMirror.cm-keymap-fat-cursor div.CodeMirror-cursor{width:auto;border:0;background:#7e7;z-index:1}.cm-tab{display:inline-block}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable{color:#000}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-variable-3{color:#085}.cm-s-default .cm-property{color:#000}.cm-s-default .cm-operator{color:#000}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta{color:#555}.cm-s-default .cm-error{color:red}.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-header{color:#00f}.cm-s-default .cm-quote{color:#090}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:700}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-invalidchar{color:red}div.CodeMirror span.CodeMirror-matchingbracket{color:#0f0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#f22}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{line-height:1;position:relative;overflow:hidden;background:#fff;color:#000}.CodeMirror-scroll{margin-bottom:-30px;margin-right:-30px;padding-bottom:30px;padding-right:30px;height:100%;outline:0;position:relative}.CodeMirror-sizer{position:relative}.CodeMirror-gutter-filler,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-vscrollbar{position:absolute;z-index:6;display:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;padding-bottom:30px;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;padding-bottom:30px;margin-bottom:-32px;display:inline-block}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-lines{cursor:text}.CodeMirror pre{border-radius:0;border-width:0;background:0 0;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible}.CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-code pre{border-right:30px solid transparent;width:-webkit-fit-content;width:fit-content}.CodeMirror-wrap .CodeMirror-code pre{border-right:none;width:auto}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;overflow:auto}.CodeMirror-wrap .CodeMirror-scroll{overflow-x:hidden}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-measure pre{position:static}.CodeMirror div.CodeMirror-cursor{position:absolute;visibility:hidden;border-right:none;width:0}.CodeMirror-focused div.CodeMirror-cursor{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.cm-searching{background:#ffa;background:rgba(255,255,0,.4)}@media print{.CodeMirror div.CodeMirror-cursor{visibility:hidden}} \ No newline at end of file
diff --git a/plugins/jetpack/modules/custom-css/custom-css/css/customizer-control.css b/plugins/jetpack/modules/custom-css/custom-css/css/customizer-control.css
index e7927ff2..1076f0c5 100644
--- a/plugins/jetpack/modules/custom-css/custom-css/css/customizer-control.css
+++ b/plugins/jetpack/modules/custom-css/custom-css/css/customizer-control.css
@@ -44,11 +44,7 @@
padding-top: 3px;
opacity: .8;
}
-@-moz-document url-prefix() {
- #customize-control-wpcom_custom_css_content_width_control input[type="text"] + span {
- top: 47px;
- }
-}
+
#customize-control-wpcom_custom_css_content_width_control input[type="text"]:focus + span {
opacity: 1;
}
@@ -147,4 +143,3 @@ body.editing-css .wp-full-overlay.expanded {
input[type=jetpackCss] {
display: none;
}
-
diff --git a/plugins/jetpack/modules/custom-css/custom-css/js/css-editor.js b/plugins/jetpack/modules/custom-css/custom-css/js/css-editor.js
index 9b17d73f..65467aea 100644
--- a/plugins/jetpack/modules/custom-css/custom-css/js/css-editor.js
+++ b/plugins/jetpack/modules/custom-css/custom-css/js/css-editor.js
@@ -1,4 +1,3 @@
-/* jshint onevar: false, smarttabs: true */
/* global postboxes, addLoadEvent */
( function( $ ) {
diff --git a/plugins/jetpack/modules/custom-css/custom-css/js/use-codemirror.js b/plugins/jetpack/modules/custom-css/custom-css/js/use-codemirror.js
index 60439308..5ad75510 100644
--- a/plugins/jetpack/modules/custom-css/custom-css/js/use-codemirror.js
+++ b/plugins/jetpack/modules/custom-css/custom-css/js/use-codemirror.js
@@ -1,5 +1,3 @@
-/* jshint onevar: false, smarttabs: true */
-
( function( $ ) {
var Jetpack_CSS = {
modes: {
diff --git a/plugins/jetpack/modules/custom-css/custom-css/preprocessors/lessc.inc.php b/plugins/jetpack/modules/custom-css/custom-css/preprocessors/lessc.inc.php
index ddaa4788..81662da7 100644
--- a/plugins/jetpack/modules/custom-css/custom-css/preprocessors/lessc.inc.php
+++ b/plugins/jetpack/modules/custom-css/custom-css/preprocessors/lessc.inc.php
@@ -2,7 +2,7 @@
/**
* lessphp v0.5.0
- * http://leafo.net/lessphp
+ * https://leafo.net/lessphp
*
* LESS CSS compiler, adapted from http://lesscss.org
*
@@ -746,7 +746,7 @@ class lessc {
if ($suffix !== null &&
$subProp[0] == "assign" &&
is_string($subProp[1]) &&
- $subProp[1]{0} != $this->vPrefix)
+ $subProp[1][0] != $this->vPrefix)
{
$subProp[2] = array(
'list', ' ',
@@ -999,14 +999,7 @@ class lessc {
// IE8 can't handle data uris larger than 32KB
if($fsize/1024 < 32) {
if(is_null($mime)) {
- if(class_exists('finfo')) { // php 5.3+
- // phpcs:ignore PHPCompatibility.PHP.NewClasses.finfoFound
- $finfo = new finfo(FILEINFO_MIME);
- $mime = explode('; ', $finfo->file($fullpath));
- $mime = $mime[0];
- } elseif(function_exists('mime_content_type')) { // PHP 5.2
- $mime = mime_content_type($fullpath);
- }
+ $mime = jetpack_mime_content_type( $fullpath );
}
if(!is_null($mime)) // fallback if the mime type is still unknown
@@ -1202,7 +1195,7 @@ class lessc {
// mixes two colors by weight
// mix(@color1, @color2, [@weight: 50%]);
- // http://sass-lang.com/docs/yardoc/Sass/Script/Functions.html#mix-instance_method
+ // https://sass-lang.com/documentation/functions/color#mix
protected function lib_mix($args) {
if ($args[0] != "list" || count($args[2]) < 2)
$this->throwError("mix expects (color1, color2, weight)");
@@ -1858,7 +1851,7 @@ class lessc {
$this->pushEnv();
$parser = new lessc_parser($this, __METHOD__);
foreach ($args as $name => $strValue) {
- if ($name{0} != '@') $name = '@'.$name;
+ if ($name[0] != '@') $name = '@'.$name;
$parser->count = 0;
$parser->buffer = (string)$strValue;
if (!$parser->propertyValue($value)) {
@@ -2517,7 +2510,7 @@ class lessc_parser {
$hidden = true;
if (!isset($block->args)) {
foreach ($block->tags as $tag) {
- if (!is_string($tag) || $tag{0} != $this->lessc->mPrefix) {
+ if (!is_string($tag) || $tag[0] != $this->lessc->mPrefix) {
$hidden = false;
break;
}
@@ -2571,7 +2564,7 @@ class lessc_parser {
protected function fixTags($tags) {
// move @ tags out of variable namespace
foreach ($tags as &$tag) {
- if ($tag{0} == $this->lessc->vPrefix)
+ if ($tag[0] == $this->lessc->vPrefix)
$tag[0] = $this->lessc->mPrefix;
}
return $tags;
@@ -2593,7 +2586,7 @@ class lessc_parser {
/**
* Attempt to consume an expression.
- * @link http://en.wikipedia.org/wiki/Operator-precedence_parser#Pseudo-code
+ * @link https://en.wikipedia.org/wiki/Operator-precedence_parser#Pseudo-code
*/
protected function expression(&$out) {
if ($this->value($lhs)) {
diff --git a/plugins/jetpack/modules/custom-css/custom-css/preprocessors/scss.inc.php b/plugins/jetpack/modules/custom-css/custom-css/preprocessors/scss.inc.php
index 344b55f1..a59a653b 100644
--- a/plugins/jetpack/modules/custom-css/custom-css/preprocessors/scss.inc.php
+++ b/plugins/jetpack/modules/custom-css/custom-css/preprocessors/scss.inc.php
@@ -4,10 +4,10 @@
*
* @copyright 2012-2013 Leaf Corcoran
*
- * @license http://opensource.org/licenses/gpl-license GPL-3.0
- * @license http://opensource.org/licenses/MIT MIT
+ * @license https://opensource.org/licenses/gpl-license GPL-3.0
+ * @license https://opensource.org/licenses/MIT MIT
*
- * @link http://leafo.net/scssphp
+ * @link https://leafo.net/scssphp
*/
/**
@@ -2380,7 +2380,7 @@ class scssc {
/**
* CSS Colors
*
- * @see http://www.w3.org/TR/css3-color
+ * @see https://www.w3.org/TR/css-color-3/
*/
static protected $cssColors = array(
'aliceblue' => '240,248,255',