Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

CSS refactor #177

Merged
merged 5 commits into from
Feb 24, 2018
Merged

CSS refactor #177

merged 5 commits into from
Feb 24, 2018

Conversation

tdewolff
Copy link
Owner

@tdewolff tdewolff commented Feb 16, 2018

This refactors how CSS minifies its values for properties. All complex declarations are ignored (ie. containing blocks or is not a list of values separated by WS or comma). It is now possible to more easily inspect all values of a property so that more complex minification rules can be made in the future (think about shorthand declaration such as border, outline, background, font, etc). This fixes #175 and #176

PS: performance does not change significantly

@pieterclaerhout
Copy link

Any ideas when this will be merged and become available? We're actually waiting for this to use in one of our apps where we were running into this bug...

@tdewolff
Copy link
Owner Author

tdewolff commented Feb 23, 2018

Working on it now, I need to gain confidence by testing it on a test set.

Current regressions: values within functions are not minified by default. rgba( for example will be minified, but not within linear-gradient(, because the latter has not been implemented. Non-exhaustive list of unsupported functions:

  • linear-gradient + vendors
  • calc
  • transform specific functions:
    • scale + variations
    • perspective
    • translate + variations
    • rotate + variations

Bugs:

  • import url(//example.com) becomes import //example.com, but should have quotes surrounded

@tdewolff
Copy link
Owner Author

The regressions in minification will be fixed soon, @pieterclaerhout merging now!

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

Successfully merging this pull request may close these issues.

CSS: Dimension for 0 should not be stripped inside of calc expression
2 participants