Skip to content
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

SVG filters defined with filter: url(...) are lost #349

Closed
gaearon opened this issue Aug 29, 2014 · 2 comments
Closed

SVG filters defined with filter: url(...) are lost #349

gaearon opened this issue Aug 29, 2014 · 2 comments

Comments

@gaearon
Copy link

gaearon commented Aug 29, 2014

This code:

[data-menu="true"] .social-Summary-content,
[data-menu="true"] .editor-Grabbox > * {
  opacity: .5;
  -webkit-filter: url(data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZmlsdGVyIGlkPSJibHVyIj4KICAgICAgICA8ZmVHYXVzc2lhbkJsdXIgc3RkRGV2aWF0aW9uPSIxMiIgLz4KICAgIDwvZmlsdGVyPgo8L3N2Zz4=#blur);
          filter: url(data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZmlsdGVyIGlkPSJibHVyIj4KICAgICAgICA8ZmVHYXVzc2lhbkJsdXIgc3RkRGV2aWF0aW9uPSIxMiIgLz4KICAgIDwvZmlsdGVyPgo8L3N2Zz4=#blur);
  -webkit-filter: blur(8px);
          filter: blur(8px);
}

gets incorrectly reduced to

.editor-Grabbox>*,[data-menu=true] .social-Summary-content{opacity:.5;-webkit-filter:blur(8px);filter:blur(8px)}

As you can see, SVG filters are lost.

@gaearon
Copy link
Author

gaearon commented Aug 29, 2014

Actually it looks like clean-css removes fallback style declarations (at least in case of filter).

@jakubpawlowicz
Copy link
Collaborator

Duplicate of #290. In the meantime please group declarations like below or use --skip-aggressive-merging.

[data-menu="true"] .social-Summary-content,
[data-menu="true"] .editor-Grabbox > * {
  opacity: .5;
  -webkit-filter: url(data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZmlsdGVyIGlkPSJibHVyIj4KICAgICAgICA8ZmVHYXVzc2lhbkJsdXIgc3RkRGV2aWF0aW9uPSIxMiIgLz4KICAgIDwvZmlsdGVyPgo8L3N2Zz4=#blur);
  -webkit-filter: blur(8px);
          filter: url(data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZmlsdGVyIGlkPSJibHVyIj4KICAgICAgICA8ZmVHYXVzc2lhbkJsdXIgc3RkRGV2aWF0aW9uPSIxMiIgLz4KICAgIDwvZmlsdGVyPgo8L3N2Zz4=#blur);
          filter: blur(8px);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants