Closed dustyndoyle closed 9 years ago
@dustyndoyle This is an interesting question. I chose to use the push and pull classes because my instinct is that on mobile the content is the most important thing and should come first.
Sidebars are generally the same across pages and on a mobile device I want to get to the unique content as quickly as possible. I think having the unique content come first is also be beneficial from an SEO perspective.
I can certainly imagine situations where the sidebar (whether it be left or right) would need to come before the content on mobile view but I think this is an edge case. Thank you for posting your solution as I'm sure I'll hit this edge case at some point and knowing the solution already is awesome.
Overall, I am going to mark this wontfix and close this issue.
Thanks.
Currently the sidebar-content layout has the same code order as the content-sidebar layout.
The only difference between the layouts is the sidebar-content has the push and pull classes to flip the order. For a project I am working on I needed the sidebar markup to be first, so on mobile screens the sidebar shows up before the content. With the current way it is working it would not do that because the content markup is first and the sidebar markup is second, making the content display first on mobile screens. The biggest problem with moving the sidebar is the
genesis_do_sidebar
function does not remove the<aside>
tags, only the inner content. Today after lots of searching I found thegenesis_get_sidebar
function. With this function you can do something like this to move the whole sidebar before the contentI'm not sure if you want to move this way or not, but I thought I would bring it up as a possibility instead of floating the sidebar left. I also checked the genesis theme and they are doing the same thing as you with floating the sidebar left and content right. The main problem I have with doing it this way is I expect the sidebar to come first on the mobile view in the sidebar-content layout, but it does not because of the floats being used.