How to make reactive WordPress websites mobile first

Reactive websites and themes are not just popular. As more and more people use mobile devices to access the Internet, responsiveness is now an essential feature of a good website or word press theme. After viewing the WordPress Theme repository, you will find that most or recent themes are reactive. Moreover, our wpmu dev theme has also received a good response. It looks cool on all devices and runs well. But the reactive design is 7 years after Ethan Marcotte first developed it (it is 7!) Evolved for a while. Now, designing for various screen sizes is more than just identifying some breakpoints for popular devices and adding them to the style sheet. The
Make the design fit all screen sizes, not based on layout based on expected screen sizes. It is about performance, ensuring that the site is fast on all devices and all connections. And what matters is the content. Develop content that runs on all devices and design around it to provide the best possible user experience when consuming it. Ethan Marcotte’s epoch-making article on androg a list apart introduced reactive design to the world. In order to solve these problems, my favorite method is the mobile first method. This approach completely subverts the existing web design. Design the content and layout according to the large screen, and then adjust according to the small screen, instead of designing according to the small screen first, and then adjusting according to the large screen. This not only provides many advantages in content planning, design, and performance, but also makes coding more efficient. The
In this installment, we will briefly introduce the advantages of the mobile first approach and further introduce its components. We will then show you how to convert reactive topics to mobile priority topics. We will examine what this element should do to first move the default layout element and theme that created the theme. Now, let’s start with an overview of what a mobile first approach is. What is mobile first? Mobile first is a web page design and development method developed by Luke Wroblewski in his book mobile first. There are two main points. The
Rethink the web design and development approach to consider mobile devices first. Create a media query and operate it from the small screen up, rather than from the large screen down, as in simple reactive design. Male Luke Wroblewski’s mobile first is a reliable guide to this approach to web design and development. What does this mean in terms of working methods? I’m not sure. To reconsider web design and give priority to mobile, we need the following points: Focus on content and interaction rather than details, images and elements to make the site look more beautiful and fill the space. Not because there is a purpose, but because there is space, the elements displayed on the screen are discarded. User experience oriented design – design makes it easier for people to consume content than simply to make it beautiful. Considering the needs of content, now that there is a small screen that can work, what should be put in fact? Configure content for easy interaction on a small screen. The site and code are efficient. This does not mean that your site or theme should not look good. Attractive and modern design is important for UX and impression. However, mobile first design is not only about appearance, but also about interaction, user interaction and efficient use of space. The
Prioritizing mobile development also affects the way topics are built. Key considerations include: By default, content blocks
You can choose to configure crab (or use a pre processor), but by default, you will have it. Two code blocks: for desktop and mobile. The
Now, let’s look at how to convert this to a mobile first layout. First remove the two code blocks. You can now define the layout for the small screen size at the top of the spreadsheet. The original style of the 9e581aef4c8bbf4cdfdeed0b4d6776e6 Mini screen is short. Because you do not have to undo the actions you have created for a larger screen. Now, create a media query using min width instead of max width. Load summary 9e581aef4c8bbf4cdfdeed0b4d6776e6 looks familiar? The style must be the same as the style used as the default in the reaction style sheet. Therefore, there is no code volume advantage, but there is an advantage in performance. Devices with smaller screens will ignore these contents instead of working on them, and then redefine them as elements added to the reaction medium. Ask questions Mobile devices offer some performance improvements. The
Since the max width value has a greater impact on the entire width element than the Min width value of the media query, this code line repeats the screen size with a width less than 1000px. Here is a challenge for you. Remove the appropriate part of the code and add it to the second larger screen oriented media query. This is how to convert a reactive layout to a mobile first layout. There are two steps: Create a default style for small screens that use a small amount of code. Add a media query using min width instead of max width, and copy the default style of the reaction theme here. To work fully with layouts, you must make some adjustments and adjust other elements, such as navigation, but this is essentially a method. Switching to mobile first is easier than you think, and switching from reactive topics to mobile first sounds like a real headache. You must completely recreate the style sheet and start from scratch. Yeah. Error. Very simple, unless there is an opportunity to reconsider the design and code. If you want to change the same design and layout in a move first way, just switch the layout style and delete some unnecessary code. Now use this feature in an existing reactive topic. This will help to develop the first mobile theme from scratch in the future. Are you coding your phone first? Please tell me what you think of it in the following comments! Labels: moving reactions

Author:

Leave a Reply

Your email address will not be published. Required fields are marked *