PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Fri Dec 19, 2014 6:56 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 44 posts ]  Go to page Previous  1, 2, 3
Author Message
 Post subject: Re: PHP Code tags
PostPosted: Tue Jan 15, 2008 10:00 am 
Offline
DevNet Master
User avatar

Joined: Wed Dec 06, 2006 5:14 pm
Posts: 3635
Location: Toronto, Canada
maybe have the expand / contract button open them to full-height instead of closing them? So toggle between a max-height and unrestricted?


Top
 Profile  
 
 Post subject: Re: PHP Code tags
PostPosted: Tue Jan 15, 2008 11:31 am 
Offline
Site Admin
User avatar

Joined: Tue Dec 23, 2003 3:10 am
Posts: 11470
Location: Toronto
Kieran Huggins wrote:
maybe have the expand / contract button open them to full-height instead of closing them? So toggle between a max-height and unrestricted?


Indeed. The scroll bar is a bit annoying on any decent resolution since your so limited the amount of code viewable..


Top
 Profile  
 
 Post subject: Re: PHP Code tags
PostPosted: Tue Jan 15, 2008 4:06 pm 
Offline
Site Administrator
User avatar

Joined: Wed Aug 25, 2004 7:54 pm
Posts: 12722
Location: New York, NY, US
I agree and was just thinking the same thing.

_________________
(#10850)


Top
 Profile  
 
 Post subject: Re: PHP Code tags
PostPosted: Tue Jan 15, 2008 6:41 pm 
Offline
DevNet Master
User avatar

Joined: Wed Jun 27, 2007 9:44 am
Posts: 4294
Location: Sofia, Bulgaria
Kieran Huggins wrote:
maybe have the expand / contract button open them to full-height instead of closing them? So toggle between a max-height and unrestricted?


Then how about adding a default view of it in the User control panel :)


Top
 Profile  
 
 Post subject: Re: PHP Code tags
PostPosted: Tue Jan 15, 2008 9:55 pm 
Offline
Breakbeat Nuttzer
User avatar

Joined: Wed Mar 24, 2004 8:57 am
Posts: 13098
Location: Melbourne, Australia
Sheesh! 8O All this hacking to do on someone else's code....

/me agrees with everything said...


Top
 Profile  
 
 Post subject: Re: PHP Code tags
PostPosted: Thu Jan 17, 2008 3:14 am 
Offline
DevNet Master

Joined: Thu Oct 06, 2005 3:57 pm
Posts: 3360
Ok, I found out what has to be done about the code blogs: remove the font-family:monospace; It looks illegible. Removing that brings back my beloved font-family Lucida grande as the font used for the code blocks.


Top
 Profile  
 
 Post subject: Re: PHP Code tags
PostPosted: Thu Jan 17, 2008 4:29 am 
Offline
Breakbeat Nuttzer
User avatar

Joined: Wed Mar 24, 2004 8:57 am
Posts: 13098
Location: Melbourne, Australia
matthijs wrote:
Ok, I found out what has to be done about the code blogs: remove the font-family:monospace; It looks illegible. Removing that brings back my beloved font-family Lucida grande as the font used for the code blocks.


I'm actually messing around with the syntax tags right now and have just tried what you said. Although it may work nicely with your browser settings, in my FF and in Safari I end up with a non-monospaced font (same as the page maybe?):

Syntax: [ Download ] [ Hide ]
class Foo {
  function bar($x) {
    for ($i = 0; $i < $x; $i++) {
      //something
    }
  }
}


Unfortunately to see the changes on other posts they need to be editted and resubmitted due to the way the BBCode works.


Top
 Profile  
 
 Post subject: Re: PHP Code tags
PostPosted: Thu Jan 17, 2008 8:28 am 
Offline
DevNet Master

Joined: Thu Oct 06, 2005 3:57 pm
Posts: 3360
Yes, I also end up with the non-monospaced font, Lucida grande in my case
Syntax: [ Download ] [ Hide ]
stylesheet.css (line 242)
.postbody {
font-family:"Lucida Grande","Trebuchet MS",Helvetica,Arial,sans-serif;
font-size:1.3em;
line-height:1.4em;
}

That's much better.

Should it be mono-space? I also noticed that increasing the font-size a bit also helped a lot.


Top
 Profile  
 
 Post subject: Re: PHP Code tags
PostPosted: Thu Jan 17, 2008 8:34 am 
Offline
Moderator
User avatar

Joined: Mon Nov 03, 2003 7:13 pm
Posts: 5930
Location: Odessa, Ukraine
matthijs wrote:
Should it be mono-space? I also noticed that increasing the font-size a bit also helped a lot.

Are you joking? The code should be displayed in a monospace font, that's for sure. Otherwise all code formatting will go wild. Or were you talking about something else?


Top
 Profile  
 
 Post subject: Re: PHP Code tags
PostPosted: Thu Jan 17, 2008 9:51 am 
Offline
DevNet Master

Joined: Thu Oct 06, 2005 3:57 pm
Posts: 3360
No, I wasn't joking :)

Then just a text-size increase of .1em or something for the code will do the trick. I live-edited the styles for the code block and .1 or .2 was enough to make a big difference. Of course, how something looks will depend on someone's system, so it can never be perfect for everybody. But if code text is tiny for me, having good eyesight, I'm sure more people would appreciate a tiny bit bigger.

But again, the moderators will have to decide what's best, this is just my feedback.


Top
 Profile  
 
 Post subject: Re: PHP Code tags
PostPosted: Thu Jan 17, 2008 9:56 am 
Offline
Admin
User avatar

Joined: Wed Aug 13, 2003 7:02 am
Posts: 4522
Location: York, UK
matthijs: are you saying it should or shouldn't be monospaced!?

I'm confused :|


Top
 Profile  
 
 Post subject: Re: PHP Code tags
PostPosted: Thu Jan 17, 2008 10:22 am 
Offline
Site Administrator
User avatar

Joined: Tue Sep 09, 2003 6:04 pm
Posts: 14293
Location: Fremont, CA, USA
I think it should be monospace (perhaps even Courier or Courier New) and I think it should be at 9pt. If a fixed size is not appropriate then maybe we can use a relative size compared to the board defaults.


Top
 Profile  
 
 Post subject: Re: PHP Code tags
PostPosted: Thu Jan 17, 2008 10:34 am 
Offline
Moderator
User avatar

Joined: Mon Nov 03, 2003 7:13 pm
Posts: 5930
Location: Odessa, Ukraine
Everah wrote:
If a fixed size is not appropriate then maybe we can use a relative size compared to the board defaults.

relative sizes ftw!


Top
 Profile  
 
 Post subject: Re: PHP Code tags
PostPosted: Thu Jan 17, 2008 11:09 am 
Offline
DevNet Master

Joined: Thu Oct 06, 2005 3:57 pm
Posts: 3360
JayBird wrote:
matthijs: are you saying it should or shouldn't be monospaced!?

I'm confused :|

Sorry, I wasn't clear. I just noticed that removing the monospace font, and thereby having a non-monospaced font render the text, made it a lot more readable. But, I didn't think about the spacing issue. A monospace font is, of course, better for code fomatting.

Then the next best thing to do to improve the legibility is to increase the font-size a bit. I know I can do that myself by ctrl+ / cmnd +, but it's annoying to do that for every visit. And besides that, it's not the font-size of the board itself, only the font-size of the code blocks that's too small. In my humble opinion, that is (and for my specific system. But that's a default Mac setting, so wouldn't be too uncommon in the population visiting this forum).


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 44 posts ]  Go to page Previous  1, 2, 3

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group