You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Zimit2, we are rewriting CSS (both inline and in plain files).
The process is:
parse the CSS with tinycss2 and rewrite each CSS rules based on a fine understanding of their meaning
if it fails (probably due to some invalid CSS), rewrite the CSS with simpler regex rules
We might want to push this even further by searching which CSS rule is invalid (tinycss2 is quite tolerant), rewriting all valid ones with the "fine understanding of their meaning" and apply regex rules only to the invalid CSS rules (which have a significant chance to not processed by the browser anyway). This makes sense mostly in the plain file scenario, inline CSS is not expected to contain many rules.
This has already been discussed a bit in #175 where @mgautierfr said:
I have think about that, but not an easy task. We would have to reimplement tinycss2 serialize feature. And on top of that, it is not clear about what to do in case of parsing error. Even tinycss try to be smart and recover error but give up on parsing error (Kozea/tinycss2@main/tinycss2/ast.py#L105-L115).
I consider this is not needed for Zimit2 project completion (at least based on our current understanding of the situation).
The text was updated successfully, but these errors were encountered:
In Zimit2, we are rewriting CSS (both inline and in plain files).
The process is:
We might want to push this even further by searching which CSS rule is invalid (tinycss2 is quite tolerant), rewriting all valid ones with the "fine understanding of their meaning" and apply regex rules only to the invalid CSS rules (which have a significant chance to not processed by the browser anyway). This makes sense mostly in the plain file scenario, inline CSS is not expected to contain many rules.
This has already been discussed a bit in #175 where @mgautierfr said:
I consider this is not needed for Zimit2 project completion (at least based on our current understanding of the situation).
The text was updated successfully, but these errors were encountered: