Admin Styles Loading on Frontend
-
The plugin loads its editor stylesheet (handle: timeline-block-common-editor-css) on the frontend in WP v7.0.2. That handle depends on wp-edit-blocks, so WordPress also pulls in wp-reset-editor-styles, common, forms, wp-components, etc. on every public page. The result is that wp-admin/css/common.min.css gets applied to the frontend, which breaks themes badly.
For example, its .wrap margin rule hits themes that use .wrap on the main element, and its “p { font-size: 13px }” rule overrides the theme’s body typography site-wide.
To reproduce: activate the plugin on any site, view a frontend page logged out, and check the head for common-css and forms-css link tags.
The editor stylesheet should be registered as editorStyle in block.json (or enqueued on enqueue_block_editor_assets) so it only loads in the editor. For now I’m dequeuing timeline-block-common-editor-css from my theme as a workaround, but this needs a fix in the plugin.
You must be logged in to reply to this topic.