Bug Report: Media query is stripped when preceded by a CSS comment

  • Profile Image
    stiklab
    Asked on April 26, 2015 at 05:28 PM

    I believe I discovered an issue with the way CSS is parsed from the form designer and placed into the form embed. See the proof below:

     

    With nothing inserted in the CSS editor of the designer, the "Injected CSS Code" is empty when viewed in the inspector of the web browser (as expected and as desired):

    https://i.imgur.com/X1s01ao.png

    https://i.imgur.com/jNySOve.png

     

    When a simple media query is inserted in the CSS editor, the Injected CSS Code appears. Again, this is as expected and as desired.

    https://i.imgur.com/Sf9uDkc.png

    https://i.imgur.com/5b2coNL.png

     

    HOWEVER, when the same media query is preceded by a comment, the contents of the query are stripped, resulting in empty @media rule in the browser.

    https://i.imgur.com/vKQyg4x.png

    https://i.imgur.com/UNI8sXh.png

     

    I believe there is an issue in the way the CSS is parsed when it's pulled from the CSS designer and injected into the embed. For reference, I am using the script embed, which renders an iframe to the page.

     

    This is a reproducible bug that should be addressed.

  • Profile Image
    jonathan
    Answered on April 26, 2015 at 06:26 PM

    Thank you for providing us the detailed information.

    I have forwarded the details of this thread to our higher team support so that they can checked the reported issue on the CSS media query comment bug.

    We will update you as soon as new status is available.

    Thanks.