Media Queries and Editor

4 posts, 0 answers
  1. Chad
    Chad avatar
    14 posts
    Member since:
    Mar 2007

    Posted 24 Mar 2014 Link to this post

    Would media queries mess up the processes that go on between design / html / preview ?
  2. Bozhidar
    Admin
    Bozhidar avatar
    680 posts

    Posted 25 Mar 2014 Link to this post

    Hello,

    To be able to provide adequate answer, I would need some additional information regarding the specific scenario:
    1. Would you please elaborate more on the specific media queries?
    2. Where are those queries defined - inside the RadEditor's content or on the page itself?
    3. Which exactly processes do you mean to be messed up?

    A sample page demonstrating the exact scenario will be of great help.

    Regards,
    Bozhidar
    Telerik
     

    Build cross-platform mobile apps using Visual Studio and .NET. Register for the online webinar on 03/27/2014, 11:00AM US ET.. Seats are limited.

     
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Chad
    Chad avatar
    14 posts
    Member since:
    Mar 2007

    Posted 25 Mar 2014 in reply to Bozhidar Link to this post

    In the Editor
    The processes that happen when you switch between design / html / preview.

    What we're seeing is that a customer with a custom media query in their html that is put into the editor body, the image size is for some reason getting changed. I'm wondering if it's possible the media query is changing the size of the image when it''s displaying in design or preview and then translating it back to a new HTML size when it goes back into the HTML mode in the editor.
  5. Bozhidar
    Admin
    Bozhidar avatar
    680 posts

    Posted 26 Mar 2014 Link to this post

    Hello,

    I have tested with the following code:

        <head runat="server">
            <title></title>
            <style>
                @media (max-width: 600px) {
                img {
                width: 100px;
                height: 100px;
                }
                }
                img {
                width: 500px;
                height: 500px;
                }
            </style>
        </head>
        <body>
        </body>
    </html>

    Switching between modes works fine and I don't see any problems. If in your case, if the media query is enabled it is possible to apply some changes based on the styles specified in the media query.

    We will need a simple working code demonstrating the case in order to give you a more detailed explanation.

    Regards,
    Bozhidar
    Telerik
     

    Build cross-platform mobile apps using Visual Studio and .NET. Register for the online webinar on 03/27/2014, 11:00AM US ET.. Seats are limited.

     
Back to Top