PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Sun Nov 19, 2017 5:15 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Sun Jun 19, 2011 6:42 am 
Offline
Forum Contributor

Joined: Sat Jan 03, 2009 4:27 pm
Posts: 148
At the moment it's quite difficult to read the code people provide because of the lack of line-height/leading. Using { line-height: 1.2; } seems to be the preferred option.


Top
 Profile  
 
PostPosted: Sun Jun 19, 2011 12:13 pm 
Offline
DevNet Resident
User avatar

Joined: Wed Apr 01, 2009 1:31 pm
Posts: 1531
If you have Greasemonkey and somewhere to host a CSS file, you can modify the stylesheet however you want (as I do).

This Greasemonkey script appends a new link tag to the head tag of every page on forums.devnetwork.net. The link references a custom stylesheet hosted locally.
Syntax: [ Download ] [ Hide ]
// ==UserScript==
// @name             DevNetwork.net Custom Style
// @namespace        http://localhost/
// @description      Adds a custom stylesheet.
// @include          http://forums.devnetwork.net/*
// ==/UserScript==

var link = document.createElement('link');
link.type = 'text/css';
link.href = 'http://localhost/custom.css';
link.rel = 'stylesheet';
document.head.appendChild(link);

Here is the stylesheet I use.
Syntax: [ Download ] [ Hide ]
.content .syntax {
    background-color: inherit;
    border-width: 0;
    color: #444444;
    display: block;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9em;
    line-height: 1.2em;
    margin: 0 0 0 0.2em;
    padding: 0;
    width: auto;
}
.content .syntax-header {
    border-width: 0;
    color: #B4B9BF;
    font-family: Arial, Verdana, Helvetica, sans-serif;
    font-size: 0.8em;
    font-weight: normal;
    margin: 0;
    padding: 0.2em 0;
    text-align: right;
}
.syntax-header a:link, .syntax-header a:visited {
    border-bottom: 1px dotted #B4B9BF;
    color: #B4B9BF;
    text-decoration: none;
}
.syntax-header a:hover, .syntax-header a:active {
    border-bottom: 1px dotted #FF1010;
    color: #FF1010;
    text-decoration: none;
}
.syntax-content {
    background-color: #F4F7F8;
    border-color: #D4D9DF;
    border-style: dotted;
    border-width: 1px 0;
    line-height: 1.2em;
    margin: 0;
    padding: 0;
}
.syntax-content div {
    padding: 0.3em;
}


Top
 Profile  
 
PostPosted: Sun Jun 19, 2011 3:55 pm 
Offline
DevNet Master
User avatar

Joined: Sun Feb 15, 2009 12:08 pm
Posts: 2794
Location: .za
MichaelR wrote:
At the moment it's quite difficult to read the code people provide because...

I've found that lack of proper indentation and line-lengths of more than 80 characters makes this happen :\

The Greasemonkey and stylesheet idea sounds pretty cool i might give it a go myself.

_________________
“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.” - Mosher’s Law of Software Engineering


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 2 guests


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