-
Notifications
You must be signed in to change notification settings - Fork 384
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CSS missing only when logged in #3299
Comments
That's likely. If you view source of the page it should indicate which styles are specifically excessive and thus being removed. You should see a CSS manifest in an HTML comment right before the Nevertheless, please test the latest pre-release: v1.3-RC1. In this new version the admin bar is exempted from validation, so its CSS (and JS!) is not sanitized. See #3187. |
After installing v1.3-RC1, some styles came back, but not all of them. The things that are still being excluded are:
What can I do to investigate this further? |
Share the HTML comment that appears before the |
|
Excellent. The issue is the “Notes” module in Jetpack. If you turn that off that module then the CSS should no longer be a problem. I have a PR open for Jetpack which includes direct support for this: Automattic/jetpack#13450 It looks like I need to open a PR for Yoast as well. Nevertheless, instead of deactivating the Jetpack module you can also just add this code to your custom theme or plugin to mark the stylesheets as being in AMP dev mode: add_filter(
'amp_dev_mode_element_xpaths',
function ( $xpaths ) {
$ids = [
'yoast-seo-adminbar-css',
'wpcom-notes-admin-bar-css',
'noticons-css',
// Add more element IDs as desired.
];
foreach ( $ids as $id ) {
$xpaths[] = sprintf( '//*[ @id = "%s" ]', $id );
}
return $xpaths;
}
); |
Dude. Thanks so much. Everything works as expected now. |
Opened PR to add AMP dev mode support for WordPress SEO: Yoast/wordpress-seo#13502 |
There are some styles that are being stripped from the page when i'm logged in.
Could this possibly be due to CSS tree shaking and also why the admin bar is not displayed?
The text was updated successfully, but these errors were encountered: