You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by "Benjamin Weidig (JIRA)" <ji...@apache.org> on 2019/01/14 13:49:00 UTC

[jira] [Commented] (TAP5-2606) Inline SVG image is broken in proudction mode, because whitespaces are removed

    [ https://issues.apache.org/jira/browse/TAP5-2606?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16742080#comment-16742080 ] 

Benjamin Weidig commented on TAP5-2606:
---------------------------------------

Because we ran into the same issue I wanted to share our experience.

Besides the "url()"-poblem there are also issues with "calc()" and whitespace removal, and in the YUI issues/PRs you find some more problems

We thought about possible resolutions in my company and there not many good options:
 # Update YUI to latest code and fix any issues ourselves
 # Use a JS-based optimizer via ScriptEngine
 # Write your own CSS-Lexer/-Optimizer

I gave option 3 a spin on a slow weekend, but it's quite some work to do it right, got a small proof of concept running with ANTLR, but implementing all the optimizations would be cumbersome.

Instead we went with option 1 and replaced the CssMinimizer with the current code of YUI plus some mergeds PRs, removal of old IE rules, extracting almost all patterns to static member, and implementing it as an AbstractMinimizer directly instead of just handing it over.

 

 

 

> Inline SVG image is broken in proudction mode, because whitespaces are removed
> ------------------------------------------------------------------------------
>
>                 Key: TAP5-2606
>                 URL: https://issues.apache.org/jira/browse/TAP5-2606
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-webresources
>    Affects Versions: 5.4.4
>            Reporter: Balázs Palcsó
>            Priority: Major
>
> YUI CSS compressor bug causes this: [https://github.com/yui/yuicompressor/issues/141]
> I have raised a PR to fix that, but we can still apply my fix regardless if it gets merged or not:
> https://github.com/yui/yuicompressor/pull/319



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)