I am a german web developer, web designer, css expert, php/mysql developer & ruby on rails enthusiast. I follow the latest web trends and develop stable web solutions using a combination of PHP5, MySQL, XHTML, CSS, and Javascript. » more about me
As a follow-up to my first post on css deployment here is a handy script which reads a directory with css files and combines them automatically into one master stylesheet. No matter how many files you add while developing, before launch you can use a build script that merges them all so you can save HTTP requests.
This is just the snippet who combines the files, if you want to (and you definitely should) compress your styles, strip out all of the comments and whitespace etc ...
On 11 December 2008 W3C announced a new standard that will help Web designers and developers create sites that better meet the needs of users with disabilities and older users. Drawing on extensive experience and community feedback, Web Content Accessibility Guidelines (WCAG) 2.0 improves upon W3C's groundbreaking initial standard for accessible Web content, applies to more advanced technologies, and is more precisely testable ...
Not one week passes by where I have the recurring pleasure of meeting someone who thinks frontend development comes easy and he could teach himself CSS in a day or two. Especially print designers seem to have a pretty rough time understanding why the pixel-perfect design they've created with their DTP tools seems to be taking forever to get right in the web.
If you feel like CSS comes easy to you or you know someone who thinks that way - how about you let him explain to you what these few CSS snippets do?
If you have cool css snippets feel free to post them in the comments ...

My site as a "wordle cloud". Wordle is a toy for generating "word clouds" from text that you provide. The clouds give greater prominence to words that appear more frequently in the source text. You can tweak your clouds with different fonts, layouts, and color schemes. The images you create with Wordle are yours to use however you like. You can print them out, or save them to the Wordle gallery to share with your friends ...
With the line blurring between web developer & designer it is time that designers adapt established techniques from the developer world. A concept well established while developing in other languages is the concept of software deployment.
For CSS developers deployment should become second nature. A simple php snippet compresses your multiple css files into one file with one line of CSS. What is good enough for Microsoft or Google should be good enough for the rest of us.
<?php
header('Content-type: text/css');
ob_start("compress");
function compress($buffer) {
/* remove comments */
$buffer = preg_replace('!/\*[^*]*\*+([^/][^*]*\*+)*/!', '', $buffer);
/* remove tabs, spaces, newlines, etc ...
Two of the things I really love about the web are data visualisations and mixing css with php. Unfortunately most of them seem to be Flash or JavaScript based - both of which I hate wholeheartedly and try to avoid as much as possible. For years I've been using little php snippets to spice up my css code. I even went so far as to write a piece of php code that scrapes all the html tags, id's and classes from an existing project or website and builds a css skeleton file ...
For everyone following my "CSS Anatomy" series where I examine how the big guns use CSS you might like this article "CSS Implementations of the Rich and Famous" by Jeff Star which is basically in the same style, only much more detailed and elaborate comparing the styles of Google, Yahoo!, MSN/Live, W3C, Twitter, Wordpress, CSS Beauty, CSS Ticks and the almighty CSS Zen Garden.
While I'm at it be sure to also check out the mother of all ...
PHP's HEREDOC syntax is - albeit only used by very few developers a very handy way to create strings in PHP. Even constants can (with a little trick) be used within HEREDOC syntax.
<?php
error_reporting(E_ALL);
/* define your constants as variables */
$_CONSTANTS['ORIGIN'] = 'Haiti';
$_CONSTANTS['MEANING'] = 'spirit or divine creature';
/* turn them into real constants */
foreach($_CONSTANTS as $key => $val)
define($key, $val);
/* sample class */
class voodoo {
public $voo;
public $doo;
function __construct($voo) {
$this->voo = $voo;
$this->doo = array('doo','dooo','doooo');
}
}
$voodoo = new voodoo('Voo');
$name = 'Bondyè';
echo <<<_HTML
<p>\x41 religion originating from {$_CONSTANTS['ORIGIN']}, Voodoo is a syncretistic religion ...What kind of web developer would I be if I would not test the new überhyped Google browser. You can read a lot of detailed reviews all around the web, here's what is relevant for me.
Excerpt from Google EULA: "By submitting, posting or displaying the content you give Google a perpetual, irrevocable, worldwide, royalty-free, and non-exclusive license to reproduce, adapt, modify, translate, publish, publicly perform, publicly display and distribute any content which you submit, post or display on or through, the services ...