This is a migrated thread and some comments may be shown as answers.

Media Queries and Editor

3 Answers 67 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Chad
Top achievements
Rank 1
Chad asked on 24 Mar 2014, 05:57 PM
Would media queries mess up the processes that go on between design / html / preview ?

3 Answers, 1 is accepted

Sort by
0
Bozhidar
Telerik team
answered on 25 Mar 2014, 01:18 PM
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.

 
0
Chad
Top achievements
Rank 1
answered on 25 Mar 2014, 01:38 PM
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.
0
Bozhidar
Telerik team
answered on 26 Mar 2014, 01:14 PM
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.

 
Tags
Editor
Asked by
Chad
Top achievements
Rank 1
Answers by
Bozhidar
Telerik team
Chad
Top achievements
Rank 1
Share this question
or