[uf-discuss] Microformats and Firefox 3

Pelle W mejllistor at kodfabrik.se
Wed Sep 5 04:48:33 PDT 2007


Farndon, Tony skrev:
>> 2. Microformats are in page, and there needs to be some way 
>> to indicate the microformats are available on the page that 
>> doesn't offend page authors. How can we accomplish this?
>>     
> I second the opinion that this is a design issue and therefore should be
> handled by css in some way. This would fit into the web design paradigm
> of markup for data, css for design. My slightly different css approach;
> create custom css property:value pairs, such as that of
> -moz-border-radius.
If something should add anything it should be added by a javascript 
which the Firefox people may very well supply. To have CSS instructing 
Firefox to add something into the HTML-data seems wrong, it doesn't 
really separate the data and content from the design. If something 
should instruct anything to add new HTML-data to a document it has to be 
either the HTML itself or JavaScripts. CSS can be used to style what's 
added, but should do nothing more than that in my opinion because it's 
only purpose is to add a deisgn and if it's removed the page should work 
equally well - only not as beutiful as with the CSS added.

Let's just have a javascript like the one here below. If Firefox 
supplies a microformats object by default then all webpages can rely on 
that in Firefox it can easily be extended to add support for newer 
microformats like Prototype and other javascript frameworks today 
extends basic DOM-objects and such. If someone would like they could 
even code their own implementation of such a solution which can be used 
in other browsers than Firefox until those browsers adds support 
themselves either directly or indirectly through extensions.

<script type="text/javascript">
    if (typeof microformats.hcard == 'object') {
        // Add some actions to the page in any way, like this simple and 
bad way
        document.write('<a href="#" 
onclick="microfrmats.hcard.add(this.parentNode);">Add to addressbook</a>');
    }
</style>

There are probably better arguments for choosing a solution like this 
over a CSS and/or HTML based solution, I hope someone more experienced 
than me can tell us some of them.

/ Pelle W


More information about the microformats-discuss mailing list