Practicalweb Ltd

Technical information on this site may be out of date : no updates since 2015

Selenium test for computedStyle

June 28, 2011 , posted under css testing selenium

I wanted to write some automated tests for CSS changes and bugs, these type of issues are quite prone to regression so re-running the tests has a large benefit.

It is possible to add new assertions to selenium via the user-extensions.js file

The following adds a test for computed style, this only works in firefox as far as I know - but some automation is better than none

Read More…

Web fonts with @font-face

July 17, 2009 , posted under css design fonts

When the web first started everything was in Times New Roman, black on grey with few images.

Things have moved on a long way since then, but there are still very few fonts. I’ve worked on many sites that have tried to overcome this by various routes.

Read More…

Less is More (CSS)

June 22, 2009 , posted under css ruby

CSS revolutionised web development, <font> and <table> were a nightmare in comparison.

But still there are times when CSS feels very limited, if you want to change a colour or margin size and have to hunt through the CSS to calculate the related changes.

But now there is

Read More…

Keep Your Drupal Theme Simple

July 12, 2008 , posted under drupal css

When creating a Drupal theme it is tempting to start with one of the existing themes (Zen and Garland are often used) but I would argue against this approach.

If you start from another theme it feels good at the beginning; after all you start from a position where your site looks good. But the more customisations you make, the more you find that the old theme just adds complexity to your existing theme.

The way Drupal works is that each module can add it’s own CSS: so tabs, menu trees, filters and so on all come with some sensible styling by default. If you want it to look different you not only have to create the CSS to make it look how you want - you have to make sure this overrides the default rules.

So CSS in Drupal isn’t simple - don’t add to the complexity more than you need to.

Read More…

Testing websites in IE - verions 6 to 8

April 4, 2008 , posted under css testing best practice

When developing a website it’s important to test it in as many different web browsers as possible.

If a client has a problem viewing the page there’s little point saying “but it works on my machine”

I have found that the differences between different versions of firefox to be small enough that testing in one version is sufficient.

Read More…

CSS bugs in MSIE6

February 3, 2005 , posted under css

At work we recently redesigned our website: the old design was created in front page and made heavy use of tables, font tags, fixed size divs and a smattering of css. The new design is pure CSS using CSS hacks to workaround bugs in various browsers.

The old design had only ever been tested in MSIE and was a little quirky in other browsers, tables based layouts always seem to look more or less the same though. Mind you when there was a problem it would take me hours of trwling through nested tables to find and fix it.

Read More…