D forums now live!

Jacob Carlborg doob at me.com
Wed Feb 15 04:44:21 PST 2012


On 2012-02-15 11:55, Vladimir Panteleev wrote:
> 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.

I really like this behavior but noted a couple of things. Take this for 
example:

http://imageshack.us/f/140/dfeediphone.png/

This is an image from the iPhone simulator. As you can see, the text in 
the top post overflows the design to left. The reason for this seems to 
be because of links that don't get wrapped. It only wraps at word 
boundaries and some characters like "-". These links also causes the 
text size to become smaller sooner then it seems to have.

An idea to fix this would be to use the CSS3 property "word-break":

http://www.w3schools.com/cssref/css3_pr_word-break.asp

An other idea, that would work for basically all browsers, would be to 
add zero-width spaces to the links:

http://en.wikipedia.org/wiki/Zero-width_space

-- 
/Jacob Carlborg


More information about the Digitalmars-d-announce mailing list