D forums now live!

Sönke Ludwig ludwig at informatik.uni-luebeck.de
Wed Feb 15 06:52:41 PST 2012


Am 15.02.2012 11:55, schrieb Vladimir Panteleev:
> On Wednesday, 15 February 2012 at 00:33:29 UTC, torhu wrote:
>> On 14.02.2012 23:00, Walter Bright wrote:
>>> http://forum.dlang.org/
>>>
>>> This should replace the old miserable web interface to the forums.
>>>
>>> Thanks to Vladimir Panteleev for an awesome job writing this!
>>
>> Nice! One suggestion for improvement: don't change the font size based
>> on the browser window size. I'm not a web programmer, but I'm sure
>> someone here can suggest a better way of setting the font size.
>
> That's a tough one... This behavior is part of an effort to make the
> interface look good on any screen size. This doesn't include just PCs,
> but also mobile devices.
>
> The advantage of the current approach is that it does not rely on
> JavaScript - it's completely CSS-based. It's not just the font size,
> either - the navigation column on the left is hidden if the viewport is
> not wide enough, and some other sizes are adjusted.
>
> While I could use JavaScript to query the viewport window on load time
> and apply the adjustments only on page load, it'd have to mean relying
> on JavaScript, and you'd still see the font size change when you resize
> the window and click a link.
>
> I don't think having a "font size" JavaScript widget is a better
> solution. It'd mean having one canned experience optimized for one
> device be the default for all devices. Detecting user-agents or other
> complicated logic is not something I wish to go down, either.

Do you know of CSS media queries? These together with some <meta> tags 
for mobile browsers make for a simple and powerful way to have a perfect 
layout on every device and resolution (on IE CSS conditionals can be used).

I would highly recommend this approach.

(Although I personally do not mind the current approach too much, apart 
from the fact that parts of the text do not scale)


More information about the Digitalmars-d-announce mailing list