-
-
Notifications
You must be signed in to change notification settings - Fork 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
Assets Manager doesn't use result of preceding css filter as the source for the next one #1198
Comments
Could you please submit a test to reproduce the problem? class TrimFilter implements Phalcon\Assets\FilterInterface
{
public function filter($contents)
{
$contents = str_replace(array("\n", "\r", " "), '', $contents);
return $contents;
}
}
$assets = new Phalcon\Assets\Manager();
$css = $assets->collection('css');
$css->setTargetPath('unit-tests/assets/production/1198.css');
$css->setTargetUri('production/1198.css');
$css->addCss('unit-tests/assets/1198.css');
$css->addFilter(new trimFilter());
$css->join(TRUE);
$html = $assets->outputCss('css'); result: a{b{color:black;}} |
You use only one filter. Please try this code: $css->setTargetPath('unit-tests/assets/production/1198.css');
$css->setTargetUri('production/1198.css');
$css->addCss('unit-tests/assets/1198.css');
$css->addFilter(new trimFilter());
$css->addFilter(new Phalcon\Assets\Filters\Cssmin());
$css->join(TRUE);
$html = $assets->outputCss('css'); |
ghost
mentioned this issue
Sep 15, 2013
Merged
phalcon
pushed a commit
that referenced
this issue
Sep 17, 2013
This is fixed in 1.3.0, could you give it a try? |
Yes, in 1.3.0 it works as expected. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Using custom scss filter and framework's cssmin filter for one scss file results in a file, that contains both the generated css and minified scss.
ScssFilter.php
GenericController.php
style.scss
result.css
The text was updated successfully, but these errors were encountered: