Ideas for Arc XP

_compact=true should support CSS grid

When CSS that contains grid style rules are compacted, the compactor creates a space between the unit and the fr measure. For example: "2fr" becomes "2 fr".

  • Greg MacGregor
  • Mar 7 2018
  • Shipped
Categories Developer Workflow
I need it... Week
  • Attach files
  • Admin
    Kirti Kamtikar commented
    March 25, 2019 20:42

    This is implemented in PageBuilder deployer and part of PageBuilder Fusion.

  • Greg MacGregor commented
    July 10, 2018 21:15

    I tried this again locally. While the escape sequence works (ie. "fr" units are preserved -- "5fr" remains as such and does not become "5 fr") whitespace is preserved. So if:

    - you want to use "fr" units inline in <style> blocks

    - and you add the delimiters around the <style> tag

    - and you have not minified the CSS that goes in the <style> blocks beforehand

    - then all whitespace will be preserved

    ... we can live with that, but I still think the issue should be corrected.

  • JP Blanchette commented
    June 27, 2018 13:39

    You need to use the below escape sequence in the HTML markup, to surround the style blocks that you don't want compacted. I believe that this issue has been resolved in a support ticket: https://arcpublishing.atlassian.net/servicedesk/customer/portal/2/ACS-1518

     

    <!--{{{--> 
    <style>STUFF YOU DON"T WANT US TO TOUCH</style>
    <!--}}}-->
  • JP Blanchette commented
    May 31, 2018 16:13

    Note that this CSS mangling only occurs for embedded <style>.foobar{}</style> blocks on the HTML page. Not for styles pulled in via <link> tags.

  • JP Blanchette commented
    March 07, 2018 16:54

    FR units are used for various CSS Grid properties. E.g.

    .container { grid-template-columns: 1fr 2fr 3fr; }