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

Fixed CSS code processing and minification #62

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

nomelodic
Copy link

The mrclay/minify extension did not handle relative paths correctly, in particular those with ../ and ./. It has written its own function that adjusts paths based on the initial location of the file and the final one.

An example of incorrect path handling
New path: /var/www/site/web/assets/css-compress
Old path: /var/www/site/web/css

In CSS codes, we have the path ../images/image1.png. After processing it should look like this ../../images/image1.png, but instead mrclay/minify makes it like this.


The natxet/cssmin extension does not correctly process already minified code, so it was replaced with the matthiasmullie/minify extension.

An example of incorrect code processing
Input has line @media(max-width:767px){.table-responsive ..., and the output is @media max-width:767px){.table-responsive ....

Fix #43

The mrclay/minify extension did not handle relative paths correctly, in particular those with ../ and ./. It has written its own function that adjusts paths based on the initial location of the file and the final one.

The natxet/cssmin extension does not correctly process already minified code, so it was replaced with the matthiasmullie/minify extension.

Fix skeeks-semenov#43
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

Successfully merging this pull request may close these issues.

Ошибки при сжатии css
1 participant