Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
pedantic filter should prevent inlining CSS into the body #1153
changed the title
Problem with CSS embedment
Oct 9, 2015
<body> <p>blablabla</p> <link rel="stylesheet" property="stylesheet" href="https://something/whatever.css" /> </body>
will be modified to
<body> <p>blablabla</p> <style property="stylesheet"> // Something </style> </body>
I think you just don't know what "valid" means. "Valid" here means passing the W3C validator.
Inlining CSS has substantial benefits to web-site latency which is the main goal of PageSpeed. In some cases, W3C validators flag constructs that are supported by all browsers, and PageSpeed has a choice as to whether to optimize for the validator or optimize for the end-user. By default, PageSpeed has prefers optimizing for the end-user.
PageSpeed also has a 'pedantic' filter which, if specified, ought to avoid having PageSpeed introduce new validator violations in the page. However, it probably doesn't cover this case, and that's a bug.
You probably want to turn the pedantic filter when running validators. So when you type your URL into w3c validation tool, you can append:
And having said that, I believe this case is not covered by the 'pedantic' filter, and I'm wording this bug title to reflect that.
Old title: CSS embedment makes pages invalid