-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
editor-styles-wrapper effecting previews in the components panel #11997
Comments
Noting to test these but also I think theme-specific issues should go to each theme's respective repository. I'll look into it! |
Not exclusive to buttons #12066 (comment) |
Thanks for the ticket, but can you help me understand exactly what the issue is? I realize there's additional margin on items in the preview, and prior to the pullquote gap I just fixed, there was a white gap in the right side. However the presence of the editor style wrapper in the preview is intentional, insofar as the items in the preview should inherit styles that the theme provides. The bug is not obvious to me (though forgive me if it should be, I've just had a sick kid for the past week so I'm slightly zombified). |
I feel your pain @jasmussen . Having a sick kid is the worst! The issue here boils down to user styles being injected into the components-panel. In this case Twenty Seventeen from the 5.0 branch has Hope that makes sense.
But we should probably be more anticipatory of other common
I'm not going to beat my drum about #10178 anymore but I honestly thing we need to be doing more defensive coding. Mixing user styles with app styles can quickly turn into a game of whack-a-mole. |
Thank you for the clarification. I didn't mean for you to stop beating that drum, I think it's an important one, and with your clarifications even more-so. I suppose in light of that additional information, I still think that we should consider editor styles to b in their infancy and be be mindful with how far we're trying to go with them. However the purpose of doing this is exactly so tickets like yours can be raised and addressed as we continue to refine and improve the situation. For example, I think Shadow DOM has huge potential here. Sadly it's not widely supported: https://caniuse.com/#feat=shadowdom Element queries, similarly, will go a long way, but those are also not well supported and the polyfill isn't compatible with react and modern JS frameworks. Finally, CSS |
Hopefully fixes #11997. It polishes the preview code a bit to be leaner and more readable. But mostly it adds a fwe CSS style overrides that it might inherit from the theme.
Submitted #12212 to potentially fix this. |
Hopefully fixes #11997. It polishes the preview code a bit to be leaner and more readable. But mostly it adds a fwe CSS style overrides that it might inherit from the theme.
Hopefully fixes #11997. It polishes the preview code a bit to be leaner and more readable. But mostly it adds a fwe CSS style overrides that it might inherit from the theme.
To Reproduce
Steps to reproduce the behavior:
1.Create a button in Twenty Seventeen from the WP 5.0 Branch
2. Checkout the button preview
Cause
This: https://github.com/WordPress/WordPress/blob/5.0-branch/wp-content/themes/twentyseventeen/assets/css/editor-blocks.css#L724
And this: https://github.com/WordPress/WordPress/blob/5.0-branch/wp-content/themes/twentyseventeen/assets/css/editor-style.css#L27
Desktop (please complete the following information):
Additional context
The text was updated successfully, but these errors were encountered: