CSS repository (CSS Configurator)

Show and tell logoOne page on my companies intranet has the not to unusual design flavour that it’s a form opened with ?readform and containing 7 years and 30 persons design/development skills. To be frank, it’s a complete mess.

Last week me and a collegue started to wrap things up in this form. However, I was the one with the domino designer and some knowledge on how to use it. He was more the “CSS, anti-inline, follow the standards, accessibility bla bla bla” type of guy. Which I today thank god for. It was a very interesting but still extremely challenging task we started.

After almost a weeks hard work during nights and evenings I found out that I was mostly updating the css and javascript files that my collegue sent me every minute. So I spent an hour developing the CSS Configurator (CSSConfig). It’s very simple, a database with two forms and two views.

  • EditForm (form)
  • ReadForm (form)
  • All (view)
  • CssLookup (view)

The CssLookup view has a form-formula that points to the ReadForm. The ReadForm is presenting the body field as pure text and the content-type is set to text/css. The EditForm contains three fields: Name, Body and Status. Name is the name of the stylesheet, body is the stylesheet and status is not used. :-)

When the database is open from the web it’s defaulting to the All view. When a document is opened from that view the EditForm (which is in edit mode by default) is opening the document ready for editing.

In the famous form I started this entry with I have replaced all relations to various pages, forms and system files with the path to the CSS Configurator. So now my collegue can do whatever he wants with the CSS files without the need to bother me.

The status field could be used to declare a stylesheet as active/not active. This can then be used to do a @dbcolumn on all active stylesheets and then saving some expensive round trips by joining them before sending to the browser. .

I hereby give a way this database to whoever wants it: click to download!. Please let me know if you use it.

  • http://clearframe.com/ Erskine Harris

    This is sweet. Thanks for sharing.

    E

  • Mathias

    Its not a mess. Its an artform.

blog comments powered by Disqus