XF 1.2 Responsive Design

In order to better support smaller-screen devices such as mobile phones and tablets, XenForo 1.2 will be introducing a responsive version of the default design.

What is responsive design? At the simplest level, it allows you to specify CSS that applies only if the screen width is below a certain level. This allows the design to be significantly altered to fit smaller screens. For example, tabular or horizontally-focused designs don't work well when you only have a screen that's 320px wide (an iPhone).

So, what options will XenForo provide?

ss-2013-05-24_11-33-30.webp


Here you can see that we provide 3 "inflection points". In general, they correspond to particular classes of devices.
  • Narrow (max width: 480px): phones vertical, some phones horizontal
  • Medium (max width: 600px): some phones horizontal, 7" tablets vertical
  • Wide (max width: 800px): 7" tablets horizontal, 10" tablets vertical
You can also disable the responsive design entirely. Specific pages can also opt out of the responsive design with a <xen:container /> line.

For add-on developers, many of your pages will automatically support the responsive design well. It really depends how much "default" CSS you are using. If you are creating multi-column layouts (such as some resource manager pages), you will need to write custom responsive versions. However, if you're just using standard systems like tabs and forms, you will automatically inherit the responsive changes.

The extent of changes on a page will really vary based on the width of a device. For example, "wide devices" (601-800px by default) will see mostly similar pages, but things like sidebars will be moved if needed.

But this is really more about screenshots. For ease of my job, I'm taking these screenshots in Chrome on a desktop machine. :) As always, this is a work in progress and things are still subject to change.

ss-2013-05-24_11-45-57.webp


This part does deserve special mention as it's very dynamic now. The short of it is that if there's not enough space to fit things (at any resolution), navigation/search options will be hidden as necessary and shown behind menus. User alerts/unread conversation counts will be folded into your user menu. If there is a selected navigation tab, it will always be shown as well.

These screens are all taken at the "narrow" level to show you the full extent of the possible changes.

ss-2013-05-24_11-49-35.webp ss-2013-05-24_11-50-00.webp ss-2013-05-24_11-50-46.webp ss-2013-05-24_11-51-04.webp ss-2013-05-24_11-52-22.webp ss-2013-05-24_11-53-06.webp ss-2013-05-24_11-53-36.webp
 
First move will be to move "What's New" left of Search Forums in the sub-navigation. In fact, my plan is to change it to:
What's New, Watched Threads, Mark Read, Search.

Does the responsive design show the last person to reply to a thread?
 
Mike is there any possibility of font sizes being changed to the rem unit size (http://snook.ca/archives/html_and_css/font-size-with-rem)? And a way for font sizes to changed easily (either a style property or something for each sized used)?

Currently if you use a webfont that has a smaller x-height you will need to go through and change each and every font (especially at 11px which is the most commonly declared) and changing them all in bulk adds an additional ~430-450 lines of CSS.
 
Mike is there any possibility of font sizes being changed to the rem unit size (http://snook.ca/archives/html_and_css/font-size-with-rem)? And a way for font sizes to changed easily (either a style property or something for each sized used)?

Currently if you use a webfont that has a smaller x-height you will need to go through and change each and every font (especially at 11px which is the most commonly declared) and changing them all in bulk adds an additional ~430-450 lines of CSS.
What a nice suggestion. I would appreciate if this is suggested as a feature request in a separate thread.

I can't tell how much I wished something like this. We run Urdu forum which is a complex script langues and hugely based of ligatures. A particular style in Urdu typography mainly used in printed material is called Nastaleeq which does not expand horizontally when more characters are added in a single ligature, instead, it expands horizontally and vertically both in a slanted fashion. This nature forces the font designer to leave enough space above and below xhight so that generally used all glyphs fit nicely. This means that a 12px Nastaleeq font will be roughly as small as a 9px serif font. Our community members complained a lot about smaller font size on forum initially and we had to change the font size of every single field to make it look nicer. It was such a painful experience.

Along the same lines, I would appreciate if there is a hierarchy or major category of font-family sets (is there one already that I am not aware of?) so that if we want to style user generate content in one font, menu items in another we don't have to go to every single component on an atomic level. But if we prefer overwriting some specific components, we should be able to do that as well. I am referring to the same approach as it was taken for the colors. There are categories of colors and if those are changes, every component that inherits color property from there gets that change.
 
Top Bottom