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
    25 Mar, 2019 08:42pm

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

  • Greg MacGregor commented
    10 Jul, 2018 09:15pm

    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
    27 Jun, 2018 01:39pm

    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
    31 May, 2018 04:13pm

    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
    7 Mar, 2018 04:54pm

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

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