-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
transformStyles not working correctly #16408
Comments
I just hit this as well when having having swiper included. It breaks at https://github.com/nolimits4web/swiper/blob/1c4dfa3b08727f7febd9238980d8249d89202702/dist/css/swiper.css#L490 See reworkcss/css#67. I can also confirm this only happens when the css is minified as mentioned here reworkcss/css#67 (comment) |
This seems to be working for me. When I paste the snippet into my console I get:
|
@noisysocks I think the test case was wrong. See the upstream bug report I mentioned in #16408 (comment). I have a working PR for this #17146 A reproducible test is (notice that the second selector does not become prefixed):
Or simpler:
Even simpler:
|
Thanks @oxyc—you're totally right and that second example there demonstrates the bug when I run it locally. |
Describe the bug
When loading custom css via add_editor_styles not every style is applied when any element has an svg background encoded as a data:image/svg.
To reproduce
Steps to reproduce the behavior:
wp.editor.transformStyles([{css: ".navbar-light .navbar-toggler-icon {↵background-image: url(\"data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='rgba(0, 0, 0, 0.5)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E\")}"}], '.editor-styles-wrapper');
Expected behavior
The styles should be transformed with
.editor-styles-wrapper
in front.Additional context
The text was updated successfully, but these errors were encountered: