{"id":13294895,"date":"2020-08-21T18:35:08","date_gmt":"2020-08-21T18:35:08","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/css-validation-errors-on-inline-css\/"},"modified":"2020-08-21T18:35:08","modified_gmt":"2020-08-21T18:35:08","slug":"css-validation-errors-on-inline-css","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/css-validation-errors-on-inline-css\/","title":{"rendered":"CSS Validation Errors on Inline CSS"},"content":{"rendered":"<p>First off: Thank you for your work on this awesome plugin!<\/p>\n<p>The following inline styles contain invalid CSS. Line #s correspond to the validation errors in this screenshot: https:\/\/imgur.com\/a\/cSN5LCb<\/p>\n<p>Line 89: .pum-theme-94244 .pum-container, .pum-theme-default-theme .pum-container { padding: 18px; border-radius: <strong>px<\/strong>; border: 1px none #000000; box-shadow: 1px 1px 3px <strong>px<\/strong> rgba( 2, 2, 2, 0.23 ); background-color: rgba( 249, 249, 249, 1.00 ) } <\/p>\n<p>Line 90: .pum-theme-94244 .pum-title, .pum-theme-default-theme .pum-title { color: #000000; text-align: left; text-shadow: <strong>px px px<\/strong> rgba( 2, 2, 2, 0.23 ); font-family: inherit; font-weight: 400; font-size: 32px; font-style: normal; line-height: 36px } <\/p>\n<p>Line 92: .pum-theme-94244 .pum-content + .pum-close, .pum-theme-default-theme .pum-content + .pum-close { position: absolute; height: auto; width: auto; left: auto; right: <strong>px<\/strong>; bottom: auto; top: <strong>px<\/strong>; padding: 8px; color: #ffffff; font-family: inherit; font-weight: 400; font-size: 12px; font-style: inherit; line-height: 36px; border: 1px none #ffffff; border-radius: <strong>px<\/strong>; box-shadow: 1px 1px 3px <strong>px<\/strong> rgba( 2, 2, 2, 0.23 ); text-shadow: <strong>px px px<\/strong> rgba( 0, 0, 0, 0.23 ); background-color: rgba( 0, 183, 205, 1.00 ) } <\/p>\n<p>I have this temporarily patched on my staging site by adding these (hacky) lines on 70-72 in includes\/functions\/themes\/template.php :<\/p>\n<p>$value = $value === &#8216;px&#8217; ? &#8216;0px&#8217; : $value; \/\/ If no value is included with &#8216;px&#8217;, default to zero<br \/>\n$value = substr($value, 0, 2) === &#8216;px&#8217; ? &#8216;0&#8217; . $value : $value; \/\/ If the first two charactesr of the value are &#8216;px&#8217;, prefix a zero on value<br \/>\n$value = str_replace( &#8216; px&#8217;, &#8216; 0px&#8217;, $value ); \/\/ Replace any stray &#8216;px&#8217; values with &#8216;0px&#8217;<\/p>\n<p>I&#8217;m unable to deactivate the Inline CSS feature (even though &#8220;Don&#8217;t load popup theme styles to the head.&#8221;) &#8211;setting appears to save, but has no effect. Inline CSS remains in HTML output.<\/p>\n<p>No PHP errors or warnings are getting logged; running WordPress 5.5 on PHP 7.4 and MariaDB 10.3. No caching plugin enabled.<\/p>\n","protected":false},"template":"","class_list":["post-13294895","topic","type-topic","status-publish","hentry","topic-tag-css","topic-tag-inline-css"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/13294895","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/13294895\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=13294895"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}